Live data from Hacker News

Kotlin Is Better

steve-yegge.blogspot.com

71–80 of 229 posts

Re: Kotlin Is Better

#71
post #37
post #20

I've started to come around on a similar thought recently, after a few years avoiding static typing in python. I've been toying with C# specifically. C# with visual studio is, I think, the most productive environment I've come across in programming. It's ergonomically sound, straightforward, and the IDE protects me from all sorts of relevant errors. Steve mentioned Intellij is a bit slower than he'd hope typing somet…

> Sometimes they do exactly what you need, and 70% of the time they're just totally useless. I thought that but PyCharm scores way better than 70%. I even trust it to do automatic refactors. Sometimes... > The zippiness on reaction to my typing is another huge deal. If it's anything other than instantaneous, then I notice my editor in a negative light. Maybe I grew up on IDE's but I type stuff in full only if autocom…

They're different ways of programming -- it's where you spend your brain power. You can see codebases that weren't built in IDEs: they generally don't have strong naming conventions in their classes/structures/functions.

One of my hobby projects is in C, and I prefer using an editor to an IDE. Because of an accident of history, public methods tend to be named like `P_PlayerCommandRead`, where `P` means (generally) "physics", and `Player` and `Command` are essentially nested namespaces. I specifically name things this way so that I can type them quickly without spending a lot of brain cycles on figuring out the scopes.

I'm not saying code bases built with IDEs don't have consistent naming, or that code bases built without IDEs have hellish homegrown naming. But it's kind of a "how you grew up" thing, and it latches onto a lot of underlying feelings you have about coding in general.

Re: Kotlin Is Better

#73
post #58
post #48

The "ew gross weird" reaction to Scala and Clojure is tremendously disappointing (especially coming from someone whose thesis is basically "give this new language a chance")

Clojure startup times are brutal, and simply not workable in the mobile environment where Android lives.

https://github.com/drapanjanas/re-natal

Re: Kotlin Is Better

#74
post #48

The "ew gross weird" reaction to Scala and Clojure is tremendously disappointing (especially coming from someone whose thesis is basically "give this new language a chance")

I worked on a commercial project that used Scala. Never again. Compiles were slow, IDE support was terrible, everyone had their own subset they used. I'm sure it's improved since 2010.

I work on a large Scala team. We use microservices so my regular compile times are somewhere between 4s and 20s. I rarely have to do a full rebuild.

IDE support is bad, that's a good criticism but a good chunk of us don't use IDEs, and instead write it like a dynamic language. Live inside the REPL, copy paste back and fourth.

As for 'subsets' everyone uses, I find this advantageous. Our team strongly encourages a pure functional style, but we realize not everyone is going to start out that way, and it doesn't get in the way of shipping software.

Re: Kotlin Is Better

#75
post #22

Earlier quoted context omitted.

Oh Delphi.. every time I fight with CSS and think about how easy making GUI apps used to be almost 20(sic!) years ago, I feel like something went wrong. Mandatory: https://www.youtube.com/watch?v=8pTEmbeENF4

So did Delphi handle dynamically resizing and positioning layouts? My impression is all the old highly productive gui languages (Delphi, Visual Basic, ...) used absolute positioning. Personally I'd rather have a more complex gui framework (css, swing, wpf) that handles positioning than to be forever cursed tweaking pixel width, height, x, y values.

It has anchor layout, flow layout, table layout, etc... I have typically found it easier to do the layout I wanted in delphi than CSS. The only annoying thing is that the visual designer has no undo, which you really miss when doing exploratory designs.

CSS 2 really is terrible. There's a few things in CSS 3 that make it passable, but overall I consider it a failed layout system which needs more workarounds than it provides solutions.

Re: Kotlin Is Better

#76
post #20

I've started to come around on a similar thought recently, after a few years avoiding static typing in python. I've been toying with C# specifically. C# with visual studio is, I think, the most productive environment I've come across in programming. It's ergonomically sound, straightforward, and the IDE protects me from all sorts of relevant errors. Steve mentioned Intellij is a bit slower than he'd hope typing somet…

> Sometimes they do exactly what you need, and 70% of the time they're just totally useless (which is a knock on the programming languages more than the IDEs)

See, that makes a lot of sense on the surface... And I find it playing out across a lot of the modern IDEs like PyCharm...

But I don't think it actually has to be that way.

DrRacket blew most of what I knew out of the water. It could refactor for me, trace functions and calls to definitions through multiple libraries, which included argument arities. I could write code in the REPL and push it back up into the editor, or vice versa.

Re: Kotlin Is Better

#77
Kotlin is really nice and I am very happy to have more than one great/fun/productive language however I feel like mentioning typescript might be worthwhile (yes I know it's "just" a superset of JS and you have a personal gripe with whatever you think JS is but hear me out).

* Runs everywhere js/asm

* MIxed bag of tooling, but generally you can find something amazing and you won't have to venture to sourceforge or similar to submit a patch

* Doesn't suffer from the coljure/scala "We can totally use other JVM libraries but we only really do that If we have no other option"

* Absolutely beautiful generics and spot on inference

   ```
    function pluck(key: keyof T, from: T[]) {
       return from.map(item => item[key]);
     }
   ```
* First class functions

* Incredible flexibility

   * sketch in js then annotate  

   * decide on strict nulls

   * decide on implicit types

   * various approaches to composition 
* Amazing IDE support(VSCode)(This technically falls under tooling ;))

* One of the few cross-platfrom languages that feel pretty much identical on all the platforms

[edit] Formatting

Re: Kotlin Is Better

#79
post #20

I've started to come around on a similar thought recently, after a few years avoiding static typing in python. I've been toying with C# specifically. C# with visual studio is, I think, the most productive environment I've come across in programming. It's ergonomically sound, straightforward, and the IDE protects me from all sorts of relevant errors. Steve mentioned Intellij is a bit slower than he'd hope typing somet…

> for non-static languages like Python, they're just not very good Yup. Because they can't. Without type annotations, IDE's are pretty much incapable of offering automated refactorings without human supervision (and yes, that includes Smalltalk IDE's). They can give you some primitive auto completion and navigation, but that's pretty much it.

> Yup. Because they can't.

Actually they can.

> incapable of offering automated refactorings without human supervision

> (and yes, that includes Smalltalk IDE's)

Patently false. Everyone repeat after me: automated refactoring was invented on Smalltalk with the Refactoring Browser. Again. Automated refactoring was invented on Smalltalk with the Refactoring Browser.

The lack of static type information was considered a major potential problem by the authors when they started the project. They later reported how they were surprised when it turned out it wasn't.

So please stop spreading misinformation.

'This is absolutely the greatest piece of programming software to come out since the original Smalltalk browser. It completely changes the way you think about programming. All those niggling little "well, I should change this name but..." thoughts go away, because you just change the name because there is always a single menu item to just change the name. When I started using it, I spent about two hours refactoring at my old pace. I would do a refactoring, then just kind of stare off into space for the five minutes it would have taken me to do the refactoring by hand, then do another, stare into space again. After a while, I caught myself and realized that I had to learn to think BiggerRefactoringThoughts, and think them faster. Now I use probably half and half refactoring and entering new code, all at the same speed (I should instrument to measure this). -- KentBeck'

http://wiki.c2.com/?RefactoringBrowser

http://www.refactory.com/tools/refactoring-browser

https://link.springer.com/chapter/10.1007/3-540-49255-0_180

Re: Kotlin Is Better

#80
post #22

Earlier quoted context omitted.

Oh Delphi.. every time I fight with CSS and think about how easy making GUI apps used to be almost 20(sic!) years ago, I feel like something went wrong. Mandatory: https://www.youtube.com/watch?v=8pTEmbeENF4

So did Delphi handle dynamically resizing and positioning layouts? My impression is all the old highly productive gui languages (Delphi, Visual Basic, ...) used absolute positioning. Personally I'd rather have a more complex gui framework (css, swing, wpf) that handles positioning than to be forever cursed tweaking pixel width, height, x, y values.

>... than to be forever cursed tweaking pixel width, height, x, y values.

Inevitably, this is what CSS work devolves to, though.[0]

[0] Pixel twiddling

Post reply on HN