Live data from Hacker News

Ask HN: What made you change your mind about a programming language/paradigm?

news.ycombinator.com

31–40 of 401 posts

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#31
post #22
post #10

I used to hate C and thought it was primitive, ugly, dangerous, tedious to write in and annoying to read. While writing a big project in it ( https://github.com/RedisLabsModules/RediSearch/ ) , I've discovered the zen of C I guess. Instead of primitive I started seeing it as minimalist; I've found beauty in it; and of course the great power that comes with the great responsibility of managing your own memory. And wor…

Same, except I realized this after starting my first (and current) job as a C developer. I now get way more annoyed by the in-house build system than the huge C codebase.

I made the decision to do that project in C, in part to be better at it (I did a bunch of small things with it, but nothing serious). Since I had to interact with Redis' C API, the choices were basically C or C++. I hated C++ much more than C having worked with a lot, so C it was. I can't say I didn't miss things like having shared_ptr and, you know, having destructors, but all in all it was a good experience. (side note - I now work a lot in C++ and sort of liking the newer stuff like lambdas for example)

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#32

I avoided having to learn Javascript in-depth because I thought its type system was like coding in the dark. Your IDE would either return all possible methods of all possible objects in your whole project, or wouldn't return anything at all. You need to either memorize the API of whatever object you're currently working with, or have its API open in a separate window to always see what's what. Wait, no, I still think…

Modern editors such as VS Code have type inference and you can add special comments above the functions to list they types

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#34

I 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?

#36
This is probably an unpopular opinion - Haskell, I used to think it must be cool (and useful) since people go on about it so much. I spent quite a bit of time learning it, and imho the usefulness to practicing programmers is marginal at best. It does present some useful techniques that are making their way into languages (e.g. swift optionals), but in general it didn't live up to the hype for me. I feel a lot of the things they go on about are overly complified to impress.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#37

The lack of secure composability in almost all existing languages. You cannot import untrusted code and run it in a sandbox. Unless you are completely functional, you cannot restrict the effects of your own code either. The solution to this seems to be the object capability (key) security paradigm, where you combine authority and designation (say, the right to open a specific file, a path combined with an access righ…

I recently had a lecture about something related to this in a course on advanced functional programming. Basically we were shown how you can implement a monad in Haskell that lets you preserve sensitive data when executed by untrusted code. Together with the SafeHaskell language extension, which disallows libraries to use operations that could potentially break the invariants, this seems like a very cool concept!

Functional pearl: http://www.cse.chalmers.se/~russo/publications_files/pearl-r... Slides: https://1drv.ms/p/s!Ahd2uwlk3jmIlCZr0spYc_I-OveR Source: https://bitbucket.org/russo/mac-lib

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#38
post #10

I used to hate C and thought it was primitive, ugly, dangerous, tedious to write in and annoying to read. While writing a big project in it ( https://github.com/RedisLabsModules/RediSearch/ ) , I've discovered the zen of C I guess. Instead of primitive I started seeing it as minimalist; I've found beauty in it; and of course the great power that comes with the great responsibility of managing your own memory. And wor…

90% of my dislike for C comes from a) that it is too tedious to work with strings and b) the non-existing standardized module/build system.

The C language itself is _beautiful_ but I am missing a beautiful standard library! Things which are trivial one-liners in other languages are sometimes 10-20 lines of brittle boilerplate code in C. If the standard library would have a bit more batteries included it would make trivial task easier and I could concentrate on actually getting work done. Opening a file and doing some text processing take usually a few lines in Python/PHP but in C you have 3 screens of funky code which will explode if something unforseen happens.

And working with additional libraries also a nightmare compared to composer/cargo. Adding a new library (and keeping all your libraries up to date) is dead-simple in basically any language besides C/C++.

tldr: I love the language itself but the tooling around it sucks.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#39
post #30

As someone who appreciated C and C-style languages I hated on python for a long time. I disliked python because of syntactical annoyances,mistakes I would notmally iron out at compile time now happen at run time and version fragmentation with no backward compatibility at times. On that last point,new java versions for example would deprecate features over time allowing the programmer the option of enabling these feat…

"I disliked python because of syntactical annoyances,mistakes"

That's how I felt coming from perl to python, but I did learn to like it after working with it a bit.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#40
post #10

I used to hate C and thought it was primitive, ugly, dangerous, tedious to write in and annoying to read. While writing a big project in it ( https://github.com/RedisLabsModules/RediSearch/ ) , I've discovered the zen of C I guess. Instead of primitive I started seeing it as minimalist; I've found beauty in it; and of course the great power that comes with the great responsibility of managing your own memory. And wor…

It was the Postgresql codebase that did this for me, but C is a mixed bag. Because it gives you so much space, it's more on the folks managing a project to establish a specific design mindset (design patterns, documentation, naming conventions, etc...), and ensure that its enforced throughout the project. Codebases where this is done right are a joy to work with. Others, less so.
Post reply on HN