5 ms·
Disclaimer: I'm not a very experienced programmer and I'm probably an idiot. I think OP missed entirely the point of learning a new language. When I learn a ne
by SlySherZ 10y ago
Disclaimer: I'm not a very experienced programmer and I'm probably an idiot.
I think OP missed entirely the point of learning a new language. When I learn a new language, I try to use the language the way it was built to be used, instead of trying to adapt it to what I already know. That's why you'll often see me asking questions like: "What is the Rubyist way to solve this?". I do adapt the language, but only after I've tried their way first.
I started programming by learning C, which taught me how the computer 'thinks'. Oh, and the absolute basics of programming.
I learned C++, where I was firstly introduced to objects and reliable ways do handle resource allocations without leaks (hopefully :).
I learned Ruby, where I was firstly introduced to functional programming and a wonderful implementation of the language using objects. I also learned what expressive your code can be.
I learned JavaScript, which didn't teach me much, but I've used it extensively to practice what I had learned before. JavaScript does everything.
I learned Haskell, which taught me more functional programming, and how problems go away when you use the correct types (or containers).
I learned Scheme, which showed me how simple a language's syntax can be, while still effective. It confirmed what I knew all along: all those different syntaxes mostly don't matter.
Sure I could have learned all those things without learning a new language. But I had no idea they even existed. Now, what will I learn next? Any suggestions?
- hood_syntax 10y agoErlang/Elixir would be a good bet. Erlang very much has a "model" to it that is hand tailored to a specific niche (reliability), and fits very well in networking scenarios. Adding to that, both languages are gaining adoption and will definitely see an uptick in job postings in the coming years. If you want to learn a language for the express purpose of expanding your mind, try a postfix language like Forth or Joy. Those are different enough from what you've done so far that it'll be pretty strange to think in that manner at first. I haven't pursued either Forth or Joy beyond messing around with a couple toy examples, but they're very interesting to think about.
- SlySherZ 10y agoI will definitely check those out, thanks!
- Qwertystop 10y agoDisclaimer: I haven't used any of the languages you list other than C(++), unless you count first-term-student-level Racket as close-enough to Scheme (unlikely), so this might be something that they cover but you didn't feel worth mentioning I'm finding Lua/Terra quite interesting. Lua [1] is an extremely lightweight fast dynamic-typed interpreted (or JIT-compiled) language (don't forget to get the penlight library, though, because it's batteries-not-included otherwise). Terra [2] is a C-level bare-metal static-typed compiled language specifically designed both to use Lua as a preprocessor and to interleave with Lua code as necessary. I'm pretty sure it ends up as metaprogrammable as Lisp but without the difficulty I had parsing Lisp syntax (might not be an issue for you, given that you've got Scheme listed). [1][http://www.lua.org/ http://www.lua.org/] [2][http://terralang.org/ http://terralang.org/]
- SlySherZ 10y agoWhat are the ideas that Lua follows that are different from everything else? I'm not sure it's the language I'm looking for, but I will keep it in mind if I ever need something like it. Thanks!
- sheepmullet 10y agoIncredibly straight forward sand-boxing and embedding.
- Qwertystop 10y agoMinimalism, DSLs, and embeddability. It's got a very good API for binding with C, and is small enough to reasonably be included whole in any project if you don't want to have external dependencies. It's also extremely modifiable due to the minimalism - it's got a few primitive types, basic control-flow, and one structured type, the table (a key-value store) which is used for everything else from lists (integer keys, sugar exists for this) to sets (values as keys, "true" for values) to classes. Dotted attribute access is just sugar on string-key access, so methods are just functions with a "self" parameter (there's sugar to hide that) that you put in the table. Default-values and operator overloading - just specific keys mapping to appropriately-defined functions. I haven't looked much at JavaScript but I think it's a bit like JS's prototypes? Again, though - unless you need it tiny, you probably want Penlight or something like it to provide all the utilities that weren't quite basic enough to be core. In that case, you've got a good chunk of, effectively, the Python core libraries to work with.