Discuss Scratch

Wettining
Scratcher
500+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Just curious as to what they could be because I always found these to be very easy to use and deploy
bjskistad
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

https://google.com/search?q=structured+programming+language+list

Last edited by bjskistad (Aug. 9, 2017 17:17:47)

Wettining
Scratcher
500+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

bjskistad wrote:

https://google.com/search?q=structured+programming+language+list
About 80% of those languages are dead or object-oriented…


EDIT: I actually checked and I was right, 84% of the languages are dead or OOP

Last edited by Wettining (Aug. 9, 2017 21:08:02)

Blaze349
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Off the top of my mind:

Mit Scheme
Haskell
Clojure
C
__init__
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

When I find my code in tons of trouble
Friends and colleagues come to me
Speaking words of wisdom
Write in C

As the deadline fast approaches
And bugs are all I can see
Somewhere someone whispers
Write in C

Write in C, write in C
Write in C, write in C
LISP is dead and buried
Write in C

I used to write a lot of FORTRAN
For science it worked flawlessly
Try using it for graphics
Write in C

If you just spent nearly 30 hours
Debugging some assembly
Soon you'll be glad to
Write in C

Write in C, write in C
Write in C, yeah, write in C
Only wimps use BASIC
Write in C

Write in C, write in C
Write in C, write in C
Pascal won't quite cut it
Write in C

Write in C, write in C
Write in C, write in C
Don't even mention COBOL
Write in C

And when the screen is fuzzing
And the editor is bugging me
I'm sick of ones and zeroes
Write in C

A thousand people swear that
TP7 is the one for me
I hate the word “procedure”
Write in C

Write in C, write in C
Write in C, write in C
PL/1 is '80s
Write in C

Write in C, write in C
Write in C, write in C
The government loves Ada
Write in C
Blaze349
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Write in C
TheUltimatum
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

C
nathanprocks
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

__init__ wrote:

When I find my code in tons of trouble
Friends and colleagues come to me
Speaking words of wisdom
Write in C

–snip–
Did anyone else sing this?
Wettining
Scratcher
500+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

__init__ wrote:

When I find my code in tons of trouble


Write in C, write in C
Write in C, yeah, write in C
Only wimps use BASIC
Write in C
I use BASIC… (that compiles to C )

Last edited by Wettining (Aug. 11, 2017 16:56:58)

rdococ
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Hah, nice.

Lua.

  • It's lightweight.
  • It's high-level.
  • It's simple.
  • Yet, it's capable.


Granted I haven't been able to try out too many other languages, so I might be a bit biased - but I don't dismiss them.

technically Lua has some support for OOP, but it's optional
also, my choice of Lua is mainly influenced by Roblox and Minetest, two things people don't usually compare :P
maybe I should stop talking now :P

Last edited by rdococ (Nov. 7, 2018 13:33:57)

Blaze349
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

rdococ wrote:

Hah, nice.

Lua.

No, C. Write in C.
Jonathan50
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Lua has no object oriented programming.

Last edited by Jonathan50 (Aug. 12, 2017 12:29:27)

StackMasher
Scratcher
100+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Jonathan50 wrote:

Lua has no object oriented programming.
There is, you use tables as objects
vector = {
x = 0, y = 0,
new = function(self,initX,initY)
local to_return = {
x = initX, y = initY
}

setmetatable(to_return, { __index = self })
return to_return
end
}

a = vector:new(6,4)
print(a.y)
Inheritance is implemented using the self parameter in new (the constructor), if you want to inherit, you simply create a vector, make the changes you want it to have and the constructor will adapt with those changes
TheMonsterOfTheDeep
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Of course, with C, you can create the exact memory layouts used by object-oriented languages, so it's possible to do psuedo-object-oriented programming, but it requires a ton of boilerplate.
Jonathan50
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

StackMasher wrote:

There is, you use tables as objects
...
Inheritance is implemented using the self parameter in new (the constructor), if you want to inherit, you simply create a vector, make the changes you want it to have and the constructor will adapt with those changes
Lua doesn't have OOP, your code just uses OOP.
StackMasher
Scratcher
100+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Jonathan50 wrote:

StackMasher wrote:

There is, you use tables as objects
...
Inheritance is implemented using the self parameter in new (the constructor), if you want to inherit, you simply create a vector, make the changes you want it to have and the constructor will adapt with those changes
Lua doesn't have OOP, your code just uses OOP.
It has the ability to act like it has OOP, that's the beauty of Lua
-Io-
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

StackMasher wrote:

Jonathan50 wrote:

StackMasher wrote:

There is, you use tables as objects
...
Inheritance is implemented using the self parameter in new (the constructor), if you want to inherit, you simply create a vector, make the changes you want it to have and the constructor will adapt with those changes
Lua doesn't have OOP, your code just uses OOP.
It has the ability to act like it has OOP, that's the beauty of Lua
And it's written in C, and it can run on any machine than can compile ANSI C, and it's very lightweight – less than a quarter MB IIRC + embeddable and extendable with the C API

LuaJIT also makes it very fast, faster than the current JS implementations + it adds C FFI
Jonathan50
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

StackMasher wrote:

It has the ability to act like it has OOP, that's the beauty of Lua
Ok, but that's true of all Turing-complete languages that don't have OOP
Blaze349
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Jonathan50 wrote:

StackMasher wrote:

It has the ability to act like it has OOP, that's the beauty of Lua
Ok, but that's true of all Turing-complete languages that don't have OOP
XD
rdococ
Scratcher
1000+ posts

What is the Best Non-OOP Procedural or Structured Programming Language?

Lua has a C++ API that is used to implement a Lua API for video game extensions and mods.

Be right back, I have to pick up the pieces of my mind that exploded upon hearing the previous sentence.

Powered by DjangoBB