Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Totally agree. This is beyond taste or preference.

Yes you can build a great app in PHP. But so you can in Kotlin or Ruby or ...

Yes some have a career by starting with PHP. But that does not make it a good language for beginners. Same can be said (and to me is verrrry true) fro JavaScript.

Language design matters. It shapes how you think about code. Talk to people who've learned AND USED many languages including some esoteric ones like Haskell, a LISP or OCaml. Then see what they have to say PHP and JS for beginners.




For me, a "beginner friendly language" has these properties:

* A welcoming, helping and open community.

* Built-in guidance or enforcement away from The Wrong Way and towards The Right Way. E.g. by making the former hard to do and the latter easy.

* Ecosystem of high-quality, properly designed libraries and sample code.

I see this in e.g. Rust. But e.g. JavaScript or PHP fail on all my three points. As does my main language, Ruby, sadly.


While I agree on your three points, I don't think I would recommend Rust to a beginner developer.


Me neither.

And I'm still not certain why not. You'll have a "hello world" in minutes. Even through something like Actix. Probably faster than your average "ruby on rails hello-world" or "react hello world". As those require a lot of up-front tooling to be set up.

I guess my reluctance is that Rust very early on requires knowledge of memory-management (borrower) and intricacies such as Result and Option.

While those are good to learn for a beginner at some point, that beginner probably wants to defer them to a moment that they have actual software deployed and dabble into multithreading, get runtime exceptions back and see the software crashing.

Still, I think languages that don't even allow you to think about such stuff, like Python, Ruby or JS, do the beginner a disservice: typing, shared-memory, runtime exceptions and undefined behaviour are a real thing, and a beginner should at least see that the libraries and examples all take these issues into consideration. Instead of waving it away with "we have tests to cover most of it. probably"

I'm Ruby dev, I deal with this daily; Learning Rust and using it in production has made me a much better Ruby dev.


#2: Strict Programming lang's. I often seen frustrate new programmers, specially young new programmers making them want to give up on programming all together so I don't know if I would call that beginner friendly, I certainly would not call rust beginner friendly

I guess however we would need to define what a "beginner" target is, are we talking adults that want to learn programmed to change fields, or children wanting to inspire them to peruse programming as a career, or someone between the 2 groups


If you want to learn programming, knowing how to use type systems is valuable skill from day one.

For children see this (very different objectives indeed):

https://www.rollapp.com/app/kturtle


You are right of course. The thing that many people miss is that learning isn't just one thing from, say, Hello World to a fully fledged application but it involves learning diferent types of things in different orders.

For example, going straight-to-web can be hard since it involves several different concepts HTML is not CSS is not JS is not backend code (mostly!). So it is sometimes better to teach the basics in a desktop or console app using a single language with a single paradigm. Once they understand that, you could introduce other abstractions and explain why sometimes strong type-checking is useful and other times it is unecessary and time-wasting.


While I can understand that approach, I do wonder if my origin to programming is common or not. I did not get in to programming to become a programmer.

I learned programming to solve a problem I was having, in my case I did start out in web development in the 90's. I wanted a website that did something that I could not find premade software that did it in the way I wanted so I wrote my own. I also learned of open source and and other communities via this process.

Had I just stuck with the commercial software solution I bought, that was terrible, I would have missed out on on a skill I eventually learned to love.

The website (and company around it) I built was never successful, but from that experience I learned a skill that carried me to the career I now have


Like sibling comments mention, "beginner" is a broad definition.

I was thinking about someone from school taking their first job. Or someone who has built a WordPress site and theme as a hobby and so on. I was not thinking about a 7-year old wanting to move a turtle around. Nor about an "arts student" looking if she may like webdev.

Though, a friend who has an after-school "tech" afternoon for young kids, includes a lot of arduino, adafruit and other hardware courses. Kids love it when some robot drives around the actual world, drawing lines. More than a virtual turtle drawing virtual lines. It requires C programming. He told me he has 8-year old kids writing some C.


> Same can be said (and to me is verrrry true) fro JavaScript. Not if you use JS like Scheme: https://www.crockford.com/little.html

In fact JS is much more pleasant to write than PHP, the main reason to move way from PHP after using it for over 10 years.


JavaScript: the language that can barely understand itself is better than PHP! The language, where JetBrain's IDE (arguably one of the best IDEs when it comes to understanding languages, consistently better than any LSPs among other things) can barely understand it fully, is better than PHP! The language that has consistently added new features, but have yet to fix horrible messes of legacy design.

The majority of Gary Bernhardt's 2012 talk "wat"[0] is still relevant today with JavaScript. PHP's devs at least are actively trying to address the majority of issues people have had problems with, and have done so successfully for many of the issues it had.

In my opinion the only thing JavaScript has going for it over PHP is its ability to develop frontend and backend code using the same language, but then, you know, you'll need a million NPM dependencies if you pull in some of the simplest packages.

Until TypeScript takes over JavaScript I refuse to believe anyone who understands either languages fully prefers JS over PHP. I've yet to dabble in Deno, but I'm hoping that it also addresses much of the issues with JS, but I'm doubtful since it's also based on V8.

[0] https://www.destroyallsoftware.com/talks/wat


It can't fix its legacy design for backward compatibility reasons in browsers


The linked talk is soo true and so hilarious.


I guess it's a matter of preference because I find writing Javascript tedious, the forced async when not needed, or that for some reason Node doesn't give me a line and a description when I make a mistake, it just ... fails?


Elixir is one such language for beginners.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: