The more code I write in dynamically typed languages, the more I believe that static typing is a must. Generally speaking, I noticed that I'm shifting more and more away from "stop annoying me and let me do what I want, I know better!" part of the PL/API design spectrum, and towards "better safe than sorry". Static typing, runtime checks, data schemas, design by contract, fail fast etc. Yes, it's overhead, but it's p…
One downside to static typing is the overhead required when writing/running programs. For example, let's say you have a class `Dog` that you want to rename to be more generic so you now call it `Animal`. In Python you can test out snippets of code with `Animal` without necessarily having to worry about other pieces of code still referring to `Dog`. You would just need to make sure that the code you want to run happen…
Ask HN: What made you change your mind about a programming language/paradigm?
241–250 of 401 posts
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#242My first big Erlang project made me completely rethink my acceptance of object oriented programming in C++, Java, Python, etc. I realized that I had blindly accepted OO because it was taught as part of my college curriculum. After several years in industry I had concluded that programming was just hard in general. It wasn't until my first project in Erlang, where an entire team of OO devs were ramping up on functiona…
Ironically, Erlang’s message passing makes it more like Alan Kay’s original definition of OOP than the bowdlerised view of OO perpetrated by Java and C++.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#243Earlier quoted context omitted.
Same reaction but different type of project and language. Immutable data with persistent data structures was a game changer for me. There is place for OO but it does feel like the last 20 years our profession has been suffering from collective insanity.
Try code large a GUI project without OO.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#244Re: Ask HN: What made you change your mind about a programming language/paradigm?
#245The string processing capabilities has blown me away, however it didn't change my love for higher performance, compiled languages. Now I use it for small system tools or prototyping, but for highest performance I still use C++.
Similarly, I disliked Java. It felt slow, heavy, bloated, unnecessarily Enterprise. Again, using it changed most of the perception. I found out that for some stuff it's pretty competent, it's easy to write sophisticated stuff. GUI classes and event based XML parsers are very well thought out. I also found out that Java's infamy came from bad programming, especially in the GUI part. JDK tends to correct your GUI programming errors to simplify the stuff, however this "auto-mending" came with a performance penalty which adds up with every small mistake you make. So you need to write your code carefully. Frameworks like JaDE made me like Java even more.
In the end, most of the like/dislike comes from preconceptions and prejudice if you ask me. If the language you're using is up to the task you have at hand, and you understand the trade-offs you make with a language, there's no need and reason to dislike a language.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#246I realized just how useful shell scripting is (bash) when it occurred to me a simple five line script I wrote to erase and reclone my main work repo is the single most useful piece of code I’ve written in my first year as a web developer. God that’s a time saver.
The first thing I thought when I read this is why do you have to do this so often that you scripted it? It's good that you thought of a way to save time but this solution seems like a very blunt instrument to get back to some previous state.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#247Re: Ask HN: What made you change your mind about a programming language/paradigm?
#248It made me realise that technology is rarely a solution. In fact every new language promises a silver bullet, when in reality I've always seen its the approach to writing software and complexity that kills projects.
DDD - a sane approach to keeping complex systems simple.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#249Then I attended a brilliant conference/demo about Rust, in which the speaker proved that one could build something with Rust without giving much thought about the complex principles of the language. You could get familiar with the language by using it, and then have a much better chance to understand the core concepts of Rust.
The conference is here (in french) : https://touraine.tech/talk/o9KtP8ZrZ130zLZPzdqn/