33
votes
What programming language do you think deserves more credit?
My pick is Perl5. Even though a lot people (mostly those who’ve never touched Perl) say it’s a “write only” language, I think it does a lot right. It’s easy to prototype with, and it gives you a lot of freedom in how you want to solve a problem; which I think is one of the most important features of a programming language.
I’d like to know what your picks are!
PHP 7.x.
PHP is obviously an easy target for 'haters', and historically criticism was probably quite fair, but it has come on leaps and bounds since those earlier days and I do think the 7.x branch of PHP is great, certainly not perfect but definitely deserves more credit than it is getting!
Yeah, I don't really understand the criticisms myself. A lot of the criticisms I see concern the syntax, particularly the use of
->
for accessing class members and invoking methods,::
as a scope resolution operator, and.
for concatenation. But when you realize that dot-concatenation avoids the type coercion bullshit from JavaScript (e.g. accidentally concatenating a number and numeric string), you end up preferring it, and the other two operators are from C++, so it's not like they're unique.The other big source of complaints typically concerns standard library naming/parameter order inconsistencies. But really, who the fuck does any development without an IDE anymore? Just use autocomplete. And if it really bothers you, then write a quick wrapper function or create some wrapper objects.
Most other complaints basically boil down to "I hate this thing that literally every other weakly-typed language does!", "I hate this language because X, Y, and Z frameworks are garbage!", or the best yet, "I hate this language because the older versions that aren't even relevant anymore sucked!".
The only complaint I have is that some behavior is unintuitive, e.g. when calling
empty("0")
you would expect it to evaluate tofalse
, but it evaluates totrue
. But you know what? I wrote a fucking wrapper function for that instead of bitching online about it. It took me more time to write those last two sentences than it did for me to write code to solve the problem.Granted, there are still valid complaints about PHP. But that's the case for any language. And just like any language, PHP has its upsides and downsides, things you're going to love and things you're going to hate, standard behavior and its own individual quirks. It's kind of ridiculous to complain that a programming language behaves like a fucking programming language.
Then again, I've been working with PHP for a couple of years now with a proprietary framework that isn't complete shit, so maybe I'm a bit biased ;)
I was being facetious. I know there are plenty of people who prefer to write code from a CLI.
Every single code base that isn't complete shit usually has additional helper functions defined to accommodate for the lack of functionality in any given programming language. Often times you'll find certain primitive types wrapped in objects to help avoid certain edge cases, and at others there are third-party libraries or extensions installed that don't have native support and you want to wrap some piece of functionality to avoid headaches down the line. These implementations will typically differ quite a bit from project to project.
If every programming language is a language, then every project is a different dialect of that language. There are certain pieces of vocabulary that are used more than others, some new introductions, and even what you could call "slang" (e.g. a wrapper function for array operations). The different style guidelines and preferences regarding coding standards will quite often result in you needing to learn these different dialects, anyway. I mean hell, it's not uncommon to switch from one project where you're accustomed to using snake case for variable names and find yourself working on another where the convention is to use camel case.
I don't think it's unreasonable to be expected to dig through a
utils.php
file at the start of any project just to see what helper functions and classes your project works with to solve commonly encountered problems that the language itself doesn't handle natively, and to see what changes might've been made to adhere to desired conventions.By "proprietary", I mean that it was developed in-house by a company I used to work for. It's open-source, albeit lesser-known, and I work on a fork of it to be compatible with up-to-date tooling. There's a separate, more frequently maintained version in a private repo that gets licensed out as well, so there's an actual fully proprietary version. I'd plug it here, but it's used so seldom by outside companies that I'd definitely be giving away my identity if someone knew the name, and I'd prefer to keep some level of anonymity :)
Even the non-proprietary stuff is pretty good now. I've started a project with Laravel, and I got to say I am actually enjoying writing PHP which is a fun surprise.
Agreed. Syntax is syntax, once you learn it then it just is. I find Python's white space syntax weird by Python developers just get used to it. I'd probably do the same if I wrote Python.
And yes, the function naming/parameter order still annoys me and I still keep forgetting the name of many string functions but as you say, IDE. It's not the end of the world. Other languages have their own quirks that require either a documentation lookup or an IDE autocomplete so in reality it's really not an issue.
I've also been working with PHP for quite some time now, and so I'm possibly biased although I was certainly ready to move on from PHP 5.x. With PHP 7.x, my enjoyment of the language and being able to get things done as well as feeling like I'm writing proper code, has been renewed.
I don't think anyone complains about
::
as a scope resolution operator. That's pretty standard. C#, Rust, and probably others use it.In my experience, most people complaining about PHP were exposed to v4 - v6. Myself included. Those versions of PHP were very counter-intuitive, easy to accidentally expose your source code to the world, lacked a strong type system, and errors leaned towards the incomprehensible or just got eaten. I hear 7.x is better but if you're going to defend it, at least argue against the things that people complain about.
Source: Wrote PHP 5 for ~3 years
...I mean, I kind of did?
Sorry, I guess I missed that line.
No problem. It was admittedly a brief mention. Easy to miss :)
Personally, I don’t want to write code to solve problems inherent to the language I’m usuing. I want to write code to solve my problems. If I have to write a small library to fix a language, there has to be some major benefit of the language that I can’t get elsewhere to compensate. What is that pay-off for PHP?
Do you have any tips on getting started with PHP 7? I've tried to find tutorials but all the stuff I can see is for older versions.
Ah, not really. Mainly the PHP documentation is what I've gone with.
This looks like a useful link though:
https://www.sitepoint.com/learn-php-7-find-out-whats-new-and-more/
Thank you!
https://www.tutorialrepublic.com/php-tutorial/ looks pretty good. It goes into everything from what I can tell (I am learning as well, PHP is not something I use often but I have been trying it out again with Laravel and its kind of neat)
I think PHP got about as much credit as it deserved tbh. There are plenty of people who talk about how great it is and since it was used at Facebook it got a lot of credibility.
That said, it deserved the reputation it had for a long time, even into the 7.x releases. There are still a lot of awful bugs in it but it can be a good language if used well.
Yep, F5-based development is pretty good.
Rust
They’ve seemed to solve many of the discrepancies I had with C/C++. I believe it can become a solid competitor to C++ in due time.
I think Rust gets all the credit it deserves. I think it's a great language, and I hope that eventually I'll never have to write a line of C++ again, but it's also talked about a lot any time it's even remotely topical.
Rust is actually not that widely known. It is very talked about in certain circles but I think the industry as a whole is mostly ignorant of Rust.
Maybe we're working off of different versions of "deserves more credit". I should have added the word "positively" to my original post. The key to me is that whenever Rust is talked about, it's already in a neutral or positive light. Whether anyone actually uses it is unrelated to whether people think it's any good (i.e. whether it gets credit) IMO.
Ah, I took "credit" to mean "recognition". I do not believe Rust is widely recognized, despite its impressive accomplishments.
I think one of the major limiting factors for Rust adoption is ... Rust adoption. As far as I know, there are no large production ready projects written in Rust.
As the creators and primary maintainers of the language, I think it is up to Mozilla to show the rest of the industry that Rust is ready for prime time use. Instead, after years of development, Mozilla's flagship product is still 28% C++ and >7% Rust.
Compared to something like Go, Rust has had an incredibly slow adoption rate, even after accounting for the difficulty of learning each language. On the TIOBE index Go is #18 and Rust is at #37 (below languages like D, Dart, and Scratch). I think this is largely due to the fact that Google started using Go for serious projects immediately, but no one has done anything with Rust outside of relatively small experiments.
I think Rust still needs one big project to be used as an example in convincing average joe PM's that Rust is a safe choice for starting new projects and sparking widespread industry adoption.
Laugh all you want - VBA. It's old, it's not too pretty, but its integration with Microsoft Office can't be beaten. My job is to automate reporting and when working in "secure" or old-school environments - where you need to write a full on business case just to have notepad++ installed - VBA is king. Everyone in the organisation is able to open and work on a xlsm or xlsb file without needing anything else installed.
It keeps Excel files sizes down to a minimum and opening fast. None of that processing 5%....yawn...6% on every cell update and happily outputs anything to Word, Powerpoint etc. with minimal code.
COM for dictionaries, file systems and data connections for querying tables in sheets, csv files or something else is fantastic.
I'm just sorry that it hasn't developed more.
Do you think is an easy la gauge to learn for a noob?
I’ve been wanting to learn to program but I’m currently interested in learning in Python just because it seems to be easy and powerful according to what I have read.
+1 on automate the boring stuff. It's an amazing beginners book, but even for advanced people it's a nice resource to learn specific tasks
(my specific questions was : what should I use to parse html)
It's fairly easy to learn, but like Elronnd and hungariantoast have already said stick with Python. Python has some powerful things built in like the ability to make a list of everything - is where VBA fails. 1 line of code in Python = 5 or so lines of code in VBA.
That being said, if you are in an environment where it's a pain in the arse to have IT install other stuff, your options become limited and you start becoming creative.
Thanks for your answers!
It's definitely useful and ubiquitous, but I just hate working with it, personally. I've found the M language in the query editor a much cleaner approach to many of my uses, but I work mostly with tables.
D
Low-key, carefully and thoughtfully designed language. If I were to start on a new C-ish project, I'd be taking a very close look at it.
PS. In fact, it'd be nice to send a quick invite to WalterBright.
Person who programmed perl before here. Perl is a write only language. Perl5 is too little, too late, and it still hasn't learned that TIMTOWTDI was utterly and unarguably annihilated by PEP 20.
This is literally the opposite of an important feature, as the current safe memory scuffle happening in the industry is proving yet again.
As for languages that need more credit - functional languages as a family. Sure, lisp and haskell look funny, but as the call for programmers doing mapreduce and whatever else with Hadoop/Spark/Flink/etc the demand for programmers who can think functionally will only increase (bonus points: Python has that more or less covered too).
Perl has its place, and it is possible to write good Perl. But I think Ruby is a good replacement for many applications of Perl, maybe except when you need regexp soups. The only downside of Ruby is that documentation is not nearly as good. With Perl, the perl* man pages and perldoc can help with almost all your docs needs. Wish Ruby's case was similar.
I agree functional languages need more credit. There is a reason why the older languages still in wide use have all added mechanisms for functional programming (i.e. Lambdas in Java) in the past few years.
It's very interesting to see this perspective - I program in perl more or less professionally (yes, in 2019) and I honestly haven't experienced parsing the language as a pain point, even when dealing with code written by a large body of different people. This is on a fairly large (to me, at least) codebase, I'm guessing in the low few million lines of code.
Perhaps this is the result of working in a post Modern Perl and Perl Best Practices world? We don't even have rigidly enforced style guides.
Not to negate your experience at all, mind.
Hmm I somewhat disagree. Technically any language can be write only, I just think the line between “good” and “bad” Perl is much finer than in other languages. But I agree that it’s definitely easier to write horrible code in Perl than in most other languages lol
I also don’t necessarily think freedom corresponds with a lack of memory safety. No matter what systems programming language you use (besides Ada), you always have the possibility of memory safety issues. Even Rust, which touts itself as the safe alternative still has memory leaks.
Memory leaks, not memory safety issues. You can't dereference a null pointer, overflow a buffer, or stomp all over the stack (in normal, safe mode). Any language which allows looping and does some kind of dynamic memory allocation will have leaks. No way around that.
Julia, I'd take it over R/Python/Matlab any day of the week. I find it fun to work with, because it's quite elegant and well designed, it feels good somehow.
I had to work on a computer vision course in Julia. I had a lot of problems using different libraries written in it, because it just seems like they are not documented enough. When you look up errors on python, you can debug them or find others running into the errors. With Julia it just seemed like (in the libraries at least) - well something went wrong, good luck.
Also: trying to pass in a transposed matrix, when you have to pass in a matrix won't work, because the type has changed to transposed matrix. It was just a huge cause of headache for someone not new to programming but to the language
In some domains the libraries are still a bit under-developed yes. I would rather recommend Julia for developers than end-users at the moment.
That said debugging is easy in Julia, since everything is written in Julia you easily edit packages and even the language itself. That's a bit different in other languages where c/c++ fallbacks are very common (try fixing a bug in numpy or R dataframes).
I think transposed matrices were changed recently to be lazy. Basically when you transpose a matrix it just change its type without changing the memory layout, which is more efficient (e.g. if you transpose twice nothing is done at all). If a package doesn't support transposed matrices it's a bug with its interface.
Mathematica is super powerful for certain types of things in that realm too.
I like Mathematica yes, they even have a decent online version now that you can use for free.
The psi issue is probably a problem with the font rather than the language.
Loading time is an issue yes, it forces you to adopt a particular working style in which you don't reload things often. The reason for these long loading time is that Julia is compiled just in time, so code needs to be compiled when you first run it. Currently part of the compilation is cached on disk, but not the whole thing. There's some plans to cache more things (PackageCompiler.jl works quite well apparently) but it's not quite done yet.
I think Erlang, as well as Elixir, deserve more love, if only for the ways they force you to think about your code. They help you organize and think about the flow.
They also have better pattern matching. It makes almost any other language that claims to have pattern matching feel simplistic in that regard.
How does it compare to Haskell and MLs? I've only played with Erlang a few years ago, and IIRC it was just like other MLs.
I'm an idiot; when I wrote that, I was mostly tunnelvisioned onto imperative languages that claim to have pattern matching instead of other functional languages. I haven't done any programming in any MLs, but it would probably be about equivalent to Haskell's, from my limited experience with it.
:) BTW MLs are quite similar to Haskell. I used SML for a few times when following a Udacity course (IIRC) a few years ago. The other well known ML is OcaML. They differ from Haskell in that they allow functional impurity.
Erlang takes a lot of inspiration from Prolog too. The syntax in particular resembles Prolog quite strongly, with English punctuation (
fac(0) -> 1; fac(N) -> N * (N-1).
), a strong emphasis on tail recursion (i.e. cuts), capitalization distinguishing variables and atoms, and probably more.When I walked through the manual a few years ago, I remember being delighted with bitstrings — it's possible to pattern match directly on bytes and bits.
There are a few other surprises, like hot-swappable code. Essentially all of the unusual features are stuff you'd typically find in libraries (threading, actors, byte parsing), lifted into the core language. It's a very well-designed system.
Rust.
Just kidding ;)
If anything I'd pick some of the functional languages like Clojure. I think they really get slept on. Maybe C# gets passed up sometimes due to the M$ ecosystem, but it's actually quite pleasant to work with.
Golang for me. Almost any time it's brought up I see people basically just mocking it with such dumb, stale criticisms. "No generics," "needs a runtime, it's barely faster than C#," "lol it's garbage collected," "just use rust."
None of them are technically wrong but I feel like they're really missing the point. Go is lightning fast to understand and write. I was up and running in hours, and I felt comfortable in days. In Rust I never felt comfortable and it took me weeks to start writing code.
It reminds me a lot of Python but compiled. Even if you don't compile it ahead of time, running .go programs with
go run script.go
for me is instant, as fast as Python's interpreter while the actual execution time is leaps and bounds ahead of the performance of my little Python scripts.A few years back I was playing with roguelike map generators, my favorite was this cellular automaton-based cave system generator. Problem was, in Python even modestly sized maps would take painful amounts of time to generate.
I stumbled on Go and rewrote my stuff in Go and it compiles fast, it runs fast, and I didn't spend weeks tearing my hair out just trying to figure out how I could properly represent my program's logic without Rust's compiler chewing me out. Everything feels very clean and simple.
There's a lot of neat projects in Go for Linux. The lf file manager is one example.
I'm learning to code right now and after i'm done with shell script i think i'm going straight to Go.
Clojure and Ruby.
While Ruby had it's 5 minutes of fame /w Rails, I think it's the language with very nice community and very bright future with Ruby 3. Not even mentioning other options like truffle and GraalVM.
Clojure is probably a real underdog here, since it's lisp-inspired (I won't call it true lisp descendant because it has it's differences compared to Lisps), but it's running on JVM which is big advantage compared to anything else. You can do a lot of stuff with it. And it is best programming experience I've had. It is such a nice language, so pragmatic and expressive. But it has it fair share of problems alongside community and Cognitect, that's just a story on its own.
Clojure has non-technical problems. The community around is problematic, and the development style is right there in the worst spot between usual open-source software and proprietratry, where all everything depends on the whim of just one guy. Which is no problem if it was just some tool that you could replace whenever you wanted, but when it is the programming language, it's harder to jump ship.
It also does not offer something like CL restarts, or even proper, usable error messages at all, let aside useful. That might have changed since last time I used it tho. There are a few error signalling and restarts-like libraries I've seen, but AFAIK they are not used by the core, and not widely used in general. And when your error handling is a library, how do you deal with it when different libraries choose different ones?
When I was in a team that owned a project written in Clojure, this was basically all true.
Agreed on both. Though, I would argue that Ruby had more than its 5 minutes of fame thanks to Rails. It was a primary choice for most startups for a decade. Today, many people mistakenly assume it's dead. It's not. It's alive and kicking.
I'll add Elixir to your two suggestions. It's incredible what it has to offer (via BEAM/OTP) and although it's appreciated by many, it's still far from mainstream.
If anything, I’d say that Erlang is the one that’s underappreciated. With that said, Elixir is an amazing language with a wonderful community. Highly recommend trying it out!
Yeah Ruby+Rails is still prominent in the codebases of a handful of billion-dollar+ tech companies, maybe a dozen. Sure most are now doing rewrites in Golang or Java or Scala, but it seems to me Ruby had about 10 years of prominence.
Occam - if you dig csp/go/core.async you owe it to yourself to learn Occam and there is a plethora of old books and example programs to play with! Plus the transputer was 20 years ahead of its time.
APL/j/k - first got into these when I was doing project Euler and once finishing a problem in a blub language I would find the APL answer was so terse and so much faster I HAD to know how and why. I bought APL with a mathematical accent and never looked back. I still need to buy a new dyalog keyboard to replace my ibm model m that shorted out.
Forth - lisp like in its simplicity and ability to bootstrap your own world from nothing. Definitely a desert island language to build your ideal lisp upon even.
Smalltalk - I got lucky and took the last year that the open university used smalltalk to teach oo concepts and I am forever grateful. If you want to see what real oo could had been download squeak or pharo and dig in.
Self - imagine stripping out the classes and instances from smalltalk but retaining the graphical environment. Also if you really want to understand prototype centric oo ala javascript learning self is essential. I wish there was a newer version with better graphics but it is still fun to poke at.
scheme - buy SICP and drop out of life with parens in hand.
JavaScript - last but not least. This strange scheme like self like Algol syntaxed specimen truly is a great language.... if you are holding it right and seeing it through the lens of its predecessors.
That's Conway's Game of Life in one line 1, APL is amazing.
Not trying to funny or anything but where are those characters on the keyboard? Is that part of the learning curve?
This appears to be a common layout. I haven't used APL, but I imagine getting used to that requires some effort. I think there might be some way to write out functions names instead, but that would certainly take away some of the elegance of the language. There are also APL keyboards with the symbols printed on them.
I've never used Perl5. It's been over a decade since I used Perl at all. So I can't comment on it. What do you use it for?
Everyone loves to hate on it, but my favourite language is modern JavaScript. ECMAScript 6+. Sure JavaScript comes with lots of Wat, but when combined with Node it is so universal in scope. There have been a lot of growing pains and the eco system is messy, but it has really started to tidy up in the last year. I do almost everything in it these days and it is great to not have to constantly switch syntax when I switch from client to server code.
I haven't touched JavaScript in several years and just started learning ES6 and Typescript. The let keyword alone makes a huge difference and being able to have types makes me feel much safer coming from Java. After using Kotlin for the last few years there are definitely some niceties I miss. I didn't realize how much I loved the syntax for when the last argument is a lambda until now.
What resources did you use to learn ES6? I want to dedicate some time to it in a couple months, I forgot a lot about webdev.
I'd highly recommend YDKJS and Exploring JS books
Thanks for the recommendations!
You could try free code camp. It has a section on ES6 specifically. I also found this paid course, and while I haven't taken it myself, I have done some of his free courses in the past and enjoyed them. He also has some free tutorials on his main site.
Thanks!
Since I already have a bunch of JavaScript experience I just brushed up on the new features with the site, http://es6-features.org/#Constants. Learning TypeScript also made it easy to understand how the scoping of let works (basically exactly as you would expect block scope to work). https://www.typescriptlang.org/docs/handbook/variable-declarations.html
Funnily enough, I don’t use Perl very much if at all anymore. I mostly used it like a systems programming language though. My favorite projects were a DSL parser, an automated monthly expense tracker, a subreddit scraper, and my own tiny version of Make.
Prolog, maybe. It's always been one of those languages that sound interesting in theory, but lack practical, famous examples of application. I was a language geek some years ago and played with almost anything under the sun, and I encountered it back then. Would expect to see its applications in AI, maybe open source libraries.
Honstly, this comment should be on the top.
AppleScript. It's an insanely powerful automation tool that almost no one has even heard of. Mac-only, which is probably close to the root of the issue.
It also makes some really weird design decisions aimed at non-programmers such as 1-based indexing and attempts at natural English like syntax. I used it little many years ago, but once I started getting more comfortable with bash and Unix utils, AppleScript became more trouble than it was worth. If you need to script macOS GUI apps that provide dictionaries, it’s still good to know, though. I heard that Apple was trying to replace AppleScript with JavaScript for automating macOS, but that seems like a bad idea to me.
Perl 5 -- no ands, ifs, or butts.