Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkolaczk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
71 ms
·
811.
▲
by
pkolaczk
7y ago
This is correct, however in reality completely independent components are very rare. Even things that seem independent and truly redundant e.g. jet engines of an airliner, are much more likely to fail after one of them fails. Therefore this
812.
▲
by
pkolaczk
7y ago
In Scala and Idris. Haskell has no direct support, but I believe you can get quite close with rank-2 types. Also, typing is not the end of all the things. Most languages I listed have much stronger metaprogramming capabilities than C++. Sc
813.
▲
by
pkolaczk
7y ago
C++ doesn't have GC, reflection, annotations, code generation utilities (annotation processors, cglib, etc), first-class generic types, existential types, rich standard library etc. That's why it is "arguable". > you
814.
▲
by
pkolaczk
7y ago
The standard library doesn't come with persistent collections included. Just the fact that they are not standard like in some other languages, causes fragmentation. As for shared_ptr, they are a good idea when you don't care about
815.
▲
by
pkolaczk
7y ago
That still doesn't imply lower frame rate. Frames are pipelined.
816.
▲
by
pkolaczk
7y ago
C++ is more expressive than what? Than C probably. Than Java/C# - arguable. Than Scala/Haskell/Rust/Python/Ruby/R - no way.
817.
▲
by
pkolaczk
7y ago
A const reference to a mutable object doesn't guarantee that the object won't change contrary to an immutable object. Hence const is weaker than immutable. You can have immutable objects in C++, but C++ offers almost nothing to ma
818.
▲
by
pkolaczk
7y ago
Const correctness in C++ is a nice feature, but to say it is missing in many other languages is a bit exaggeration. Many other languages offer a much superior tool - immutable data types. Immutability is stronger than C++ const correctness
819.
▲
by
pkolaczk
7y ago
Latency doesn't affect frame rate. It affects... well, latency. 50 ms is perfectly fine for video and audio. And 4G actually is capable of much lower latency. I get pings at around 20 ms in Poland. 50 ms was achievable on 3G (HSPA+).
820.
▲
by
pkolaczk
7y ago
0.5x with metaprogramming vs 0.7x without in Scala, isn't "far less". This also matches my experience - Scala is pretty on par with Python in terms of code length. It gets a tiny hit from being statically typed, but then make
821.
▲
by
pkolaczk
7y ago
There was a junior in one of the early companies I worked at who claimed to have found a JVM bug. He insisted JVM handled comparison with null incorrectly. He had a String variable that was null, then he guarded against NPE with "if (s
822.
▲
by
pkolaczk
7y ago
Impedance is easy to measure. But this is not the only parameter. A 50 Ohm resistor has a perfect impedance, but makes a terrible antenna. I wonder how they optimized the radiation characteristic this way.
823.
▲
by
pkolaczk
7y ago
Main reason for Kotlin uptake is Android. Kotlin is successful due to smaller footprint of its runtime lib and just-slightly-better Java philosophy, because it uses Java collections instead of bringing its own like Scala did. A big runtime
824.
▲
by
pkolaczk
7y ago
Recent 2.12 and 2.13 are plenty fast. Incremental compilation on the project I do takes about 1-3 seconds for me from hitting run to running the unit test after modifying the code. I get similar times in Kotlin.
825.
▲
by
pkolaczk
7y ago
The performance difference between Scala compiler and Kotlin compiler is not as huge as advertised by Kotlin promoters: https://stackoverflow.com/questions/34615947/why-does-kotlin... Also worth noting that that a
826.
▲
by
pkolaczk
7y ago
> Scala (2003) tried to be a better Java by adding definable operators to it. That's totally wrong. The reason d'etre of Scala is merging FP and OOP in a simple and elegant way. And actually there was no "fall" in ris
827.
▲
by
pkolaczk
7y ago
Yet, Scala has much better and broader IDE support than Kotlin these days. There is first-class support in IntelliJ IDEA, Eclipse and VS-Code, and with advent of Scala 3 the IDE story is going to be even better with full LSP support, so any
828.
▲
by
pkolaczk
8y ago
You seem to be making assumption dynamic languages are more concise than statically typed ones. In modern statically typed languages with type inference it is no longer true. E.g. I find Scala more concise and expressive than Python. As for
829.
▲
by
pkolaczk
8y ago
Seriously asking: How does it work for undecidable cases? Nominal subtyping may cause ambiguity where both supertype and subtype match. Overloading may cause ambiguity where more than one overload matches, and depending on the overload we c
830.
▲
by
pkolaczk
8y ago
AFAIK Scala is much more popular than Kotlin in terms of job postings and projects in big enterprises. My data limited to some Fortune 100 companies tell me it is on par with Python in popularity. Spark, Kafka, Flink, Finangle are written m
831.
▲
by
pkolaczk
8y ago
Kotlin is just Scala with a few most advanced features taken out with no good replacement. It is not even really much faster in compilation speed when you account for its verbosity [1] and it has worse IDE support limited to just one IDE. J
832.
▲
by
pkolaczk
8y ago
Type annotations at the signature level are documentation, so I'm not so sure if global type inference is really better than local type inference. Also HM type inference doesn't play nice with type systems with subtyping or method
833.
▲
by
pkolaczk
8y ago
That's why you need typeclasses like in Haskell or Scala. And then you can be open on behaviors and types at the same time.
834.
▲
by
pkolaczk
8y ago
Scala. Particularly Scala 3. Because it is principled but also very pragmatic.
835.
▲
by
pkolaczk
8y ago
> By design there are multiple ways to write many things in the language This can be said about any language. True for Java, true for Python, true for Kotlin.
836.
▲
by
pkolaczk
8y ago
Then how come most Scala code can be translated to/from Kotlin or Swift with just find-and-replace? https://hackernoon.com/how-i-ported-10k-lines-of-scala-to-ko... The syntax of both is extremely similar. https:/
837.
▲
by
pkolaczk
8y ago
It is not. Its syntax is simpler and more regular than Java or C#, and on par with Kotlin. I haven't heard many complaints on them having complex syntax. Ironically Kotlin is promoted as simple, when its syntax is almost the same as Sc
838.
▲
by
pkolaczk
8y ago
Some wouldn't agree: http://wiki.c2.com/?StlSucks Personally, I find Scala standard library much easier to work with and at the same time much more flexible and powerful.
839.
▲
by
pkolaczk
8y ago
Only theoretically. It is not possible to implement a GC as efficient as Java GCs for C++. Pointer arithmetic, placement new, and other low level features make it hard to determine pointers from non-pointers and to move things in memory.
840.
▲
by
pkolaczk
8y ago
7 Isn't Python actually pass-by-value / pass-pointer-to-object-by-value like Java is? Many confuse pass-pointer-to-object-by-value with pass-by-reference, but they are different things. Pass-by-reference allows to write a procedur
More ›