5 ms·
What language would you suggest is friendlier, and less rife with gotchas? I find the rules of C fairly reasonable, at least on the surface.
by bxh 11y ago
What language would you suggest is friendlier, and less rife with gotchas? I find the rules of C fairly reasonable, at least on the surface.
- pklausler 11y ago#include <stdio.h> int main(void) { (printf)("C is awesome\n"); return 0; }
- pklausler 11y ago#include <stdio.h> int main(void) { (* * * * * * * * * * * * * * * * * * * * printf)("C is awesome\n"); return 0; }
- bigtunacan 11y agoIn no particular order any of the following as an introductory language. Ruby -- puts "Hello World" Python -- print "Hello World" Lua -- print("Hello World") Personally I wish every programmer would eventually learn C. Getting down to that low level and really understanding how things work is important, but if it is the first language I think we would end up with a whole lot less programmers as many would give up early.
- tosseraccount 11y agoRuby is written in C Python is written in C Lua is written in C
- bigtunacan 11y agoI'm not sure how that is pertinent. Programming languages as a general rule are initially implemented in some other programming language and then potentially later bootstrapped with their own language. Ruby has also been implemented in Java (JRuby), Ruby (Rubinius), .NET (IronRuby), JavaScript (Opal). Python in Java (Jython) and .NET (IronPython) Lua has been implemented in too many language for me to list them all here (C, C++, Lua, JavaScript, Erlang, OCaml, Go, etc...) It seems C itself was initially bootstrapped from B which was bootstrapped from BCPL. If we were to follow this to it's logical conclusion I'm guessing we end up at some version of Assembly. Are you suggesting we should start budding programmers on Assembly?
- tosseraccount 11y agoNo. Just stick with C so that it's portable and fast.
- antod 11y agoI don't write Python in C /s You meant Ruby, Python and Lua have their reference implementations written in C. They all also have other implementations written in other languages.
- tosseraccount 11y agoThat's what I meant. Most important programs are written in C. Look at what program you are running now. See if you can find the standard C library it links to.
- ArkyBeagle 11y agoThe drop from Pascal to 'C' is pretty short.