Better HN
topnewbestaskshowjobs
Log inSign up

django77

51 karma · joined Feb 8, 2019 (7y ago) · 20 submissions

Submissions

comment 6mo ago · link · parent

I was thinking about a general experience of working with null/nil. Clojure has nil punning which makes sense in the context of the language (lisp variant) and can be nice to work with.

The null is a high price to pay because eventually someone will make some type assertion somewhere in the TS codebase that will end up biting you. Sure, you can be diligent, but will every contributor during the lifetime of a project be?

Not sure about Scala, but I did see NullPointerException every so often, and what is the practical advice to handle them in Scala? It’s to use Option[T]

comment 6mo ago · link · parent

Is the productivity 2x all across the board, or are there some parts that are less productive with Rust? Also, what do you mean by write-only?

comment 6mo ago · link · parent

I agree that this can be nice when done right (Clojure), but null is a high price to pay for this convenience.

I must admit I’ve never had this problem in application development. In fact, I do want to change my callers because strengthening the contract is an opportunity to simplify the callsites - they no longer have to handle the optionality. The change might carry some semantic meaning too, why are you getting x instead of Maybe x all of the sudden? Are there some other things you should reconsider in the callers? I can see how it could be useful in library development, but there are also patterns to account for this that are idiomatic to Haskell.

comment 10mo ago · link · parent

Some societies can be stable for a while, but all of them eventually become unstable, collapse, and make room for new ones.

comment 4y ago · link · parent

This is not necessarily the case for every programming language. Plenty of them are first-class citizens in Emacs and only decent in VS Code, languages like Clojure and Haskell come to mind, and I'm guessing pretty much every LISP.

VS Code is probably a pragmatic choice if you want to start coding right away and don't care about any customization, but if someone is interested in productivity and efficiency, Emacs should be considered (along with other high-performing tools).

comment 5y ago · link · parent

It's weird to dismiss something so easily after seeing it for the first time. Maybe you should give it more time.

comment 5y ago · link · parent

You never start completely new, you always carry your previous experiences and knowledge you gained. This will be valuable to your progress even if it doesn't seem relevant right now. Speaking from experience, switching career at 28 was the best decision of my life.

comment 5y ago · link · parent

This is correct, but there are some guarantees such as the result will be an array of the same length, mapping function will be called for each element, function itself can be more easily tested in isolation and there are no imperative constructs (creating accumulator array outside of the scope, tracking the index, pushing to the accumulator array)

This lends itself very nicely to functional programming (especially with typescript IMHO)

comment 5y ago · link · parent

I've usually seen more complexity with single for loops and having complex logic mixed with imperative approach also makes it a lot harder to read.

Array methods convey meaning a lot better. There are some cases where performance matters, but usually the performence cost is negligible.

comment 5y ago · link · parent

Can you really make glass window that much more complex? It's still the same molecular structure with maybe a more complicated shape, but how it interacts with the outside world is still pretty much the same

comment 5y ago · link · parent

I don't think FP has anything to do with how data is represented, it's more related to how we operate on that data.

comment 5y ago · link · parent

You can try contemplating about why there ought to be any meaning in the first place. Once you come to terms that the universe isn't obligated to provide anything to you, I think you'll possibly appreciate life more, at least that's how I see it.

comment 6y ago · link · parent

If you already have some experience with React, Node is probably the best choice. It's in high demand, and it's always nice to have one language on both backend and frontend.

Angular is also very popular and it's often used in combination with Node or .NET

comment 7y ago · link · parent

Because when you start learning, you learn what is popular - in my case that was OOP principles in python and javascript. Only later on I learned about functional programming through Clojure. It's really hard to do that mental shift, and it takes time. A lot of people don't want to invest into learning a different paradigm

comment 7y ago · link · parent

Javascript at work, Clojure for my side projects

comment 7y ago · link · parent

> students are oblivious to what actually happens in real world.

Is Node not happening in the real world? Most job ads I see look for node, far more than python or php, so it makes perfect sense for bootcamps to teach that, not to mention keeping everything in one language.

comment 7y ago · link · parent

Try this: https://www.braveclojure.com/clojure-for-the-brave-and-true/

comment 7y ago · link · parent

At least with vim/emacs you have certain stability and proven record that they'll be around in 5 years and all the time you invest in it will pay out. For vscode, who knows what the next most popular editor will be in 2-3 years? But then again, these editors are easy to pick up. I think if vim or emacs intrigues you, you should go for it and try it out for at least a week or so.

comment 7y ago · link · parent

If everybody listened to advice 4 it would conflict with advice 5

comment 7y ago · link · parent

I don't think this is a very productive pathway, and it will take a long time. Rust and Assembly is also probably a poor choice for somebody who is starting to learn web dev, and an especially poor choice to learn before flexbox.

I would say: 1. HTML 2. CSS 3. Flexbox & Bootstrap 4. Javascript 5. React