Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Next programming language to learn...

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Next programming language to learn...
Ariesnl
Member #2,902
November 2002
avatar

I'm planning to extend my skill list.
But not sure what to tackle next..

I'm fluent in:
- Pascal
- C
- C++
- C#

I know some:
- Python
- HTML
- ASM

I know almost nothing about:
web development ( I can make a wrbsite, but that's it)

what should I add to my list ?

- Java
- Haskell
- PHP
- ASP.Net
- Ruby
- ---------

any advice ? and why ?
I'm also quite techical in my interests and skills.

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

Peter Hull
Member #1,136
March 2001

If you know c# and c++ then Java would be easy (and probably not very interesting) for you.

How about something lisp-ey, like Clojure, Racket or Scheme
Or a version of Smalltalk or Self
These are quite different from what you know.

Or, rust or go or swift since these are modern and increasingly popular and may get you a job.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Work on improving your Python, or add Ruby. Everybody needs a scripting language or two.

C++ ~= C# ~= Java

Java is still very popular, but I wouldn't want to program in it for a living. Unless I got to use Kotlin.

You might want to branch out to Rust, or D, but they're still not very popular.

Pedro's got some good ideas.

RmBeer2
Member #16,660
April 2017
avatar

Is a bad idea learning more languages, but if this have any other purpose then you must learn Java and PHP because you can found works with this. Java for Moviles and PHP for websites.

🌈🌈🌈 🌟 BlackRook WebSite (Only valid from my installer) 🌟 C/C++ 🌟 GNU/Linux 🌟 IceCream/Cornet 🌟 🌈🌈🌈

Rm Beer for Emperor 2021! Rm Beer for Ruinous Slave Drained 2022! Rm Beer for Traveler From The Future Warning Not To Enter In 2023! Rm Beer are building a travel machine for Go Back from 2023! Rm Beer in an apocalyptic world burning hordes of Zombies in 2024!

Chris Katko
Member #1,881
January 2002
avatar

D rules. other languages drool. ;)

Except it's criminally underrated so there's:
- small amounts of tutorials
- tiny amounts of actively supported existing libraries

So... if you love coding, D is a beauty. But you're not going to be able to use tons of existing code which makes you a sad panda. :( It can bind to C (but you have to make bindings, though there are auto-tools for that), and there's a fork that binds to C++. But again, it's a far cry from using C++ and just importing C code like it's nothing.

The community is very helpful, and VERY smart. One of two devs for D is a world-reknowned author of Modern C++ programming book series.

I'm not necessarily recommending you learn it, but it's worth considering because it has a great many paradigms that you'll learn about and then... wish other more popular languages weren't so crappy. The compile-time function evaluation is to die for. The universal call syntax makes everything beautiful.

I literally "invented" pass-by-name in D and made a proof-of-concept adaption of Allegro 5 for it. Only took me a week or so to learn the fundamentals and apply them.

(Pass-by-name is where you specify each input and destination argument explicitly. You can have unlimited default arguments--not just ones on the end like in C/C++/every-other-language, and you can easily change the order and have huge argument lists without confusion. ala:)

my_function(x: 121, y: 24, color: red, size: big) //OBVIOUS which argument goes to which variable (x=121) without needing intellisense. Also makes WRONG ordered arguments easy to find. You CANNOT accidently set y to x's value without explicitly writing it.
my_function(x: 121, y: 24, size:big )//color is optional and NOT the last argument!
my_function( size:big, x: 121, y: 24 ) //re-order arguments

And it was all compile-time, type-checked, that reduced down to plain, full-speed, C code.

My version also had paired values which I've never seen before.

al_draw(bitmap(taco_bmp), pos(232, 242), tint(255,255,255), rotate(0.3));

al_draw(text("Hello World"), pos(232, 242), tint(255,255,255), rotate(0.3));

Note how pos is a pair of arguments. There's NO WAY to get those inter-changed with the color tinting, or rotating (all of which are optional). al_draw enumerates almost all Allegro 5 drawing functions. Text, bitmaps, rotation, scaling, tinting, etc into one function. Everything looks and feels clean and intuitive. It would be great for a GUI too. (Also note, those are NOT FUNCTION CALLS inside. I'm actually creating plain-old-data structs and filling their values--which is also compile-time like any ordinary stack variable.)

This is also (other than Verilog which I learned it from), only usually available in dynamic languages (read: slow), like Python. So look through that Wiki and compare my version with theirs. They're fairly ugly IMO. (*Apparently C# added it in 4.0! Also apparently Objective-c/Swift SEEMS like it has it but it does not.)

I don't know. I'm just so happy with the language itself. And disappointed in how little commercial support (that's needed for a language to blossem these days).

Anyhow, for a realistic recommendation. Do you know C# in depth? If not, there's tons of generics and stuff to learn. Advanced Python too. Generators are fun. (TM)

I have seen SO MUCH HYPE for functional langauges and SO LITTLE USE for 99.9999% of them. They seem like a huge fad for general programming tasks and only useful for scientists/etc who want to think in terms of functions. Like, if your PROBLEM is functional it makes sense to use a functional language (right tool for the right job) but outside of MATH and SCIENCE most problems are way easier to explain in terms of "steps" (client clicks login THEN adds stuff to cart THEN pays for it).

I did want to explore non-traditional error handling techniques. But I've never made much progress. From what I heard, LISP actually uses "error handlers" instead of exceptions/call-stacks so an error happens then it gets dispatched to a willing/available "handler" and then can continue execution.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Ariesnl
Member #2,902
November 2002
avatar

I took a look at D. It surely has potential ! 8-)

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

DanielH
Member #934
January 2001
avatar

Why not give a whack at Malbolge!

Imperative languages (Java, Ruby, Python, C, D) are basically the same with slightly different syntax. Some have garbage collection which can be good and bad.

Java is so close to C++ that it's very easy to transfer. Just know that everything is done is a class structure.

Why not try a different paradigm? Functional (lisp/scheme), logic (prolog), ...

Peter Hull
Member #1,136
March 2001

https://pragprog.com/book/btlang/seven-languages-in-seven-weeks
This was quite a thing for people to do, for a while.
But it dates from 2010, not sure what the seven languages would be in 2019.

Depends why you are doing it - a specific project, to broaden your horizons or to get a job?

Simon Parzer
Member #3,330
March 2003
avatar

Rust or Haxe because they are cool languages.
From your list: Haskell because it is a functional language and you might learn new concepts!
Don't learn Java, it is currently dying a slow and painful death. For the same reason, don't learn PHP if you want to start web development, learn Node.js/Express or Python/Flask instead.

Chris Katko
Member #1,881
January 2002
avatar

DanielH said:

Imperative languages (Java, Ruby, Python, C, D) are basically the same with slightly different syntax. Some have garbage collection which can be good and bad.

I agree but one nitpick. D (and other imperative languages) can have DRAMATICALLY different APIs for their standard library and the "API is documentation." It's a style guide for how they expect you to use their language.

Rust's API is NOTHING like C++.

Javascript uses callbacks for everything. (which is neat)

D has "ranges" (a fat pointer, two pointers to beginning and end with a common API) instead of "iterators" and uses them to almost magical effect. Their algorithms work completely separately from their data structures! No "I need X algorithm for each X variations of a tree". It's a neat concept that I liked learning about. Whatever you have, you can go stuff like:

my_datastructure.sort.filter!("a < 20").byLine;

Here's an article by one of the authors:

http://www.informit.com/articles/article.aspx?p=1407357

He's also like, the chief language architect for C++ at Facebook.

IT SHOULD BE NOTED. D has very many "Gotchas". Some things are very minor like "import std.stdio" (why std twice?). But I've never had so many "Segfaults that destroy the stack making debugging impossible" in my entire life. Because it's garbage collected if you CRASH the collector's thread, you have almost no debug information. If the language had no GC, it'd be much better and predictable.

For example:

class ship
{
string name;
this()
 {
  writeln(name ~ " ship is made!"); //constructor (~ is string concat)
 } 

~this()
  {
  writeln(name, "ship is deleted!"); //this is fine.
  writeln(name ~ "ship is deleted!"); //this will SEGFAULT
  } 
}

Why did that blow up? Because ~ is a string concat (whereas the two argument version is two separate arguments processed in order). And during finalizer situation, the garbage collector will attempt to allocate to CREATE a new string (the combined one) which explodes. It makes sense in retrospect but nobody said anywhere in any document that said "omg, never do an allocation in a finalizer ALSO STRING CONCAT ALWAYS ALLOCATES."

Imagine debugging that inside 1000+ lines of code without a convenient example case or knowing why it's segfaulting.

In D, I very often write as little code as possible before re-compiling and testing for a crash. Also, their compiler is slow-ER than C++. Like 5X or so, it's noticable enough on my crappy laptop I use Linux on. On a modern machine (>2008) it'd probably be fine. The COMPILED CODE is very very fast, however.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Ariesnl
Member #2,902
November 2002
avatar

Apart from HTML and CSS I know (almost)nothing about web programming.
Might be interesting to learn how to write not just a website, but a real application for the web. ( like a shop, or a game that can be played in a browser and over the web).
I'm quite "low level" when it comes to programming, knowing some asm, Pascal , C , C++ etc. I can even find my way around in Embedded software. But I barely touched web development.

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

Kevin Adrian
Member #7,087
April 2006
avatar

Haskell follows the functional programming paradigm and thus is entirely different to C/C++, Java etc. Haskell is quite useful for parsing issues, for example. Personally, I am no friend of this programming paradigm.

If I may give another suggestion then I refer to the Lua language. It is designed as scripting language within C/C++ programs but it is also possible to implement standalone applications with Lua. I use Lua to as scripting language for my game engine (implemented in C).

My mouth will speak words of wisdom; the utterance from my heart will give understanding. (Psalm 49:3)

dthompson
Member #5,749
April 2005
avatar

On the subject of highly functional languages, Elixir seems all the rage these days. This'll be what I learn next.

Looks really nice; like Ruby, but better suited for concurrent stuff, and without the bloat of MRI.

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

l j
Member #10,584
January 2009
avatar

Better than Ruby? Those are fighting words...

Elixir runs on the erlang vm, you shouldn't try to compare it to ruby.

Back to the topic. I wouldn't recommend learning Java in depth. If you know C# in depth it will be easy to pick up Java, Java is a simpler language and in my opinion, not that well designed. It's still going to stick around for a long time thanks to enterprise software.

PHP is another language I can't recommend, It's a temporary solution that became way too permanent.

Now for languages I would recommend.

Haskell, it's a (almost) pure functional programming language, quite different from an imperative approach. On top of that it's got a lazy evaluation model. The type system is fairly expressive and strong, allowing highly abstract code while enforcing discipline. Started as a language for academic research but it's more than mature enough now for general application development. It does have a few historical design issues such as the default string type being nothing more than an alias for a linked list of chars (bad for performance).

Rust, a systems programming language with a lot of memory safety features at compile-time and some great features such as its traits and pattern matching. It's ownership model can be quite annoying to learn to work with, but promotes much safer code than C or C++.

Other interesting languages.

Kotlin, seems to mainly target the JVM but also seems to have a better design and less issues than Java. Having some null-safety is already a great perk to me.

F#, it's like C# with extra features and ocaml syntax. Some of its features have been ported to C#.

Clojure, it's a lisp targeting the JVM. I'm not a fan of lisp syntax but I can't deny its simplicity and expressiveness.

Prolog, only because it's a completely different paradigm. Functional programming is getting more popular, logic programming however is not (as far as I'm aware that is). But much like functional programming, learning logic programming can change the way you think and approach problems.

Erlang, it's meant for distributed systems, so you might want to learn it, if that's your thing.

dthompson
Member #5,749
April 2005
avatar

Elixir's breadth of expressivity feels very Ruby-ish to me. I know the languages' back-ends are profoundly different; I'm just commenting on how the code reads.

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Chris Katko
Member #1,881
January 2002
avatar

Java is boilerplate trash invented during the height of OOP boilerplate. C# has a 1000x better standard library (.NET). However, the huge installed base of Java means its a common sight in businesses maintaining legacy code. Java is the new COBOL.

I have never seen a successful game, or real-time product, written in Java with the sole exception of Minecraft--which was so terribly inefficient that it couldn't run on my netbook and it was completely re-written in C# for the console versions which actually run fast.

Feel free to learn it. But it's an old language with known problems.

https://www.wikiwand.com/en/Criticism_of_Java

https://tech.jonathangardner.net/wiki/Why_Java_Sucks

Quote:

Name ANY other language that introduces a memory leak when you just want to use list literals

https://www.reddit.com/r/programming/comments/9dzpu/ask_reddit_why_does_everyone_hate_java/

Quote:

Writing Java when coming from another high level language feels like you are stuttering, it is very repetitive.

[edit] One more thing I remembered about different language APIs. Python is neat because it's a "don't ask for permission, ask for forgiveness" language. You do EVERYTHING as if you know you can do it, and then simply fire of exceptions if you can't. You don't check if a file is readable before reading it. You try to read it, and catch an exception if it fails.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Simon Parzer
Member #3,330
March 2003
avatar

It makes sense in retrospect but nobody said anywhere in any document that said "omg, never do an allocation in a finalizer ALSO STRING CONCAT ALWAYS ALLOCATES."

A class destructor must not allocate new memory that is managed by the garbage collector. This is because garbage collectors are not required to guarantee that they can allocate new objects during a garbage collection cycle.

Your example is still horrifying though, because the string allocation is not obvious at all. It also doesn't "make sense" in retrospect. Why wouldn't a garbage collector guarantee that? C# has finalizers without that restriction.

I guess Rust is "better" in that regard because there is no garbage collector. On the other hand the different pointer types are difficult to understand, and you constantly have to think about "ownership" and such. It's like manual memory management except you don't get to decide anymore when and where the delete statement goes and also it's invisible.

Polybios
Member #12,293
October 2010

Quote:

Writing Java when coming from another high level language feels like you are stuttering, it is very repetitive.

Quote:

10 years ago
edited 9 years ago

So this was Java 6.

While Java as a language still has its problems (Generics / type erasure, throws-clauses / checked exceptions, ...), I think the verbosity side of things has improved a bit with Java 8+ (e.g. functional stuff like lambdas, method references, functional interfaces, streams, etc.). Plus there are very mature frameworks available for enterprise servers, but that's probably not what you want to do.

I'd do some Haskell and Prolog for different paradigms.

You will come across JavaScript at some point when you do Web stuff (or if you don't), so you might look into that more closely (take the most recent version).

Erin Maus
Member #7,537
July 2006
avatar

Java is a lot better than working on a massive Node app that uses callbacks for everything in 2019. Or having a single package have 1,000 dependencies.

Honestly Java really isn't that bad. It's a solid, cross-platform language with a reliable and extensive ecosystem. I'd take Java over D any day if I want to get work done. ;D

---
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she

Chris Katko
Member #1,881
January 2002
avatar

Polybios said:

So this was Java 6.

99% of new Java code is for existing codebases. Many of those existing codebases have not been upgraded to Java 8 (or even Java 7!!!). If I'm getting paid, I'll put up with any language. But that doesn't mean I'm going to enjoy writing it.

They didn't even get generics till Java 8! C++ beat them to it! C. PLUS. PLUS. The bloated committee based C++ beat Java.

From what I've heard, Java's one strength is that it's so insanely restrained that it makes it easier for 100 below-average code-monkeys to work on a 10 million LOC project without clobbering each others work. In otherwords, instead of having code guidelines or other proper checks, you can rely on Java itself to protect you from low paid Java programmers who don't know how to think while a single Senior Java Architect manages to stitch together all their half-arsed attempts into a single working program (and gets paid $230,000 to do it since he's the only one that actually understands the code base).

Java's philosophy is the embodiment of "people are replaceable worker drones". And if your company runs that way, it's an appropriate answer to aid that corporate culture. It helps keep drones from endangering the product. It's a very "low trust in a programmer" relationship, and again, for some corporations... that's how they prefer utilize their workers.

[edit] We have Java to thank for the FactoryFactoryFactory pattern. That's right. A factory to create a factory to create a factory... to finally create an object you care about. In real production code.

https://hackernoon.com/a-factoryfactoryfactory-in-production-822478b5afbd

Absolutely delicious. :)

And I never said you should take D over Java for production code. I'm talking about learning new ways to solve problems and open your mind. D needs more corporate sponsorship before it's production ready without risk.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

relpatseht
Member #5,034
September 2004
avatar

The only reason to use any language is the cost benefit analysis of modifying an existing code base. All projects written without the Crux of a pre-existing code base should be written in C (so as to be compatible with all other languages, should a fool be hired who demands a change arises).

Polybios
Member #12,293
October 2010

We have Java to thank for the FactoryFactoryFactory pattern.

It's not a pattern but something someone found in a codebase of (supposedly) low quality. It's just poor design. A proper DI framework can help with object instantiation issues.

Quote:

From what I've heard, Java's one strength is that it's so insanely restrained that it makes it easier for 100 below-average code-monkeys to work on a 10 million LOC project without clobbering each others work.

From what I've seen, you can still do enough stupid things with it. :-/

Quote:

Java's philosophy is the embodiment of "people are replaceable worker drones".

Well, it's been explicitly designed as a "blue collar language" to get work done. If you write code that makes you irreplaceable, chances are that your organization (and your future self) will have a problem at some point.

Chris Katko
Member #1,881
January 2002
avatar

Polybios said:

It's not a pattern but something someone found in a codebase of (supposedly) low quality. It's just poor design. A proper DI framework can help with object instantiation issues.

Name another language where that exists in a production codebase. That's the point. Anyone who knows Java KNOWS FACTORIES are used everywhere.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

 1   2 


Go to: