imperative functional static typed ftw

fuck your objects, your templates, your dynamic types, and most of all, your generics

Reply to this note

Please Login to reply.

Discussion

Hard to make higher-order functions with that. And man, that's fcking useful. And also having a full potential for polymorphism (the real one, not that c++/java/... parody).

polymorphism is totally overrated

i can write a generator in 20 minutes and i have to re-run it like once a year, whereas if i've got generics i've gotta wait 5 mimutes each time i compile it

Depends on what kind of program you write (and a language). Writing generators (other then macros) has never been my thing. Especially when more then 50 people is involved in the project. I always had better things to so.

But I'm just old fashioned LISP ans C guy. Whatever floats your boat 🤟

Also things like Protocols in clojure are absolutely awesome.

https://clojure.org/reference/protocols

macros are generators

you just don't really grasp what is going on under the board

it's a really liberating thing knowing what goes on under the board

i'm not against the idea, per se, but text/template has got everything covered and personally i prefer to use string concatenation and fmt.Sprintf rather than go to the extra effort of writing a template because frankly i'm not used to templates and it is fast for me to do

all your macros do is make for less keystrokes not less thinking, and they make for more divergence of your codebase from the underlying language - that's why #golang doesn't have macros

that's why there is gofmt, and why go is more readable than python, which is the most readable language until go

knowing what is done because of your code lets you avoid a bunch of really dumb performance and security problems that almost everyone falls into then tries to pretend didn't happen, and that's why #golang makes complex operations require a lot of code, so you remember it's complex

that's why go doesn't have macros, and why its "generics" are so limited (only work on builtin types)

a lot of people, like our fiatjaf, don't realise this and think "any" is some python/javascript dynamic type thing

no, it's an interface, any is an interface

that's why you have to type assert it and that's why if you type assert it wrong your program dies with a nice stack trace

it's false economy, all these things, that's why two of the most experienced developers in the whole industry who are still alive (!) are working on Go... co-designer of C and a guy who was documenting Unix, and teh guy who devised the chrome javascript interpreter, which is the fastest one and is the basis of nodejs

the whole industry disses on these guys and the industry uses their shit all day long, it's hilarious

Oh my, where can I sign this.

I really enjoy go (and about 60% of shit I write is in go). I'm just sad that I can't write more "generic" code in a LISP style. Shaping program by the data you process is something I call liberating. You should definetely at least try. It WILL change your view on programming.

I go back and forth on generics, they can be useful but they sure get out of hand quickly and are reached for far too often.

Most (java) programmers nowadays just go straight crazy. Instead of writing a simple function, they start with an abstraction. Even if they don't know why, there will always be only one implementation (stateful of course) and it will always be used with a single signature. No idea why...

i was amused that a dude with a CS masters was of the opinion to make interfaces before you even know you need to have more than one implementation too...

i always know i'm gonna need an interface, because i intend to design a generic type and so i design a common interface for using it in a common way and where the code needs to be specific it can type assert it to the type to access the non-interface methods

fiatjaf is so annoying with how he reaches for generics all the time in go but that's only because they renamed interface{} to 'any' and he type asserts these buggers constantly without using the comma ok syntax, and that's fine if you keep that internal but if you do that shit with other people's shit you are looking for some pain

Man, they hate me so much in our company for dismissing this kind of premature ... well shit.

They try to avoid me like hell 😂

In code reviews...

Beers are awesome ))

they love to call us salty and stubborn and this kind of thing right?

did i just migrate to being a grumpy grandpa or are these kids just a bunch of mushy brained kids that have had their minds soiled by retarded corporate mumbojumbo?

let me think

yes, definitely i don't remember mumbojumbo being a good thing in programming, so they have definitely got mushy brains and need to harden up

Sometimes I have to be part of hiring and I call it a failure of education system.

They want money, priviledges, time and no responsibility.

They offer pure nothing in return.

There are rare exceptions. Usually math (or physics) graduates who openly admits that they know shit about programming (langs), but they can easily solve the challenges in a pseudo language. I like those guys so much more.

engineers... actual engineers... people who have a grasp of the problem solving process

yes, it is rare, and some you can coax it out of them...

the fiat software industry is incredibly ... disconnected from the real world, isn't it?

You can do wordpress, you're frontend engineer.

You can "gradle build" you're backend programmer.

You know what ssh is, you're sysadmin