Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pansa2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
53 ms
·
331.
▲
by
pansa2
2y ago
> Go is seeing adoption that no other “new” language has exactly because of its simplicity Yes - for me, the simplicity is essential. As a part-time programmer, I don't have months to spend learning C++ or Rust. If my project need
332.
▲
by
pansa2
2y ago
> relatively simple
333.
▲
by
pansa2
2y ago
`case while` evaluates the condition. If the condition's true it moves forward to the next line (i.e. into the body of the loop), but if it's false it moves forward several lines, until the line after the `end` statement. `case en
334.
▲
by
pansa2
2y ago
Does Nova include a JIT compiler? Or just an interpreter?
335.
▲
by
pansa2
2y ago
I think this is fine - I don't see why having the `end`s on separate lines would make it easier to understand: if ... if ... if ... if ... if ... x =
336.
▲
by
pansa2
2y ago
Nobody ever likes my suggestion to write them all on one line. I thought it was neat - the length of the word `end` makes it line up perfectly with 4-space indentation: class HtmlTransform class Code < Base def
337.
▲
by
pansa2
2y ago
I'm surprised by the complexity of Go's generic constraints, given the language's focus on simplicity. Things like the difference between "implementing" and "satisfying" a constraint [0], and exceptions ar
338.
▲
by
pansa2
2y ago
> The problems come when they try to learn a new language without giving up the old ways In Python, I frequently see the same problem from the other side. Instead of C/C++ programmers learning Rust and "not wanting to learn t
339.
▲
by
pansa2
2y ago
If they await, they’re no longer synchronous functions
340.
▲
by
pansa2
2y ago
Obligatory link to “What Color is your Function?” https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
341.
▲
by
pansa2
2y ago
But using `await` is fundamentally what makes a function async
342.
▲
by
pansa2
2y ago
> Why did you build Konga Beat in C# and Unity and not language X and/or framework Y? > Knowing what I know now, if I started this project today, I wouldn't use Unity. Have you thought about what you might use instead?
343.
▲
by
pansa2
2y ago
Mojo isn’t anywhere near a superset of Python. It doesn’t even support classes!
344.
▲
by
pansa2
2y ago
Also embeddable scripting languages like Lua
345.
▲
by
pansa2
2y ago
> I'd be more confused about the curly brackets, I only know python and have never seen them used like that? Yeah, that’s C/C++/JavaScript/… syntax, it’s not valid Python. > why not do `all(cell[0][0],cell[1][1]
346.
▲
by
pansa2
2y ago
> You evaluate the innermost (i.e. the tail) expression first, and work your way out to the head. As a sexpr it is a little more obvious that way: `(= a (= b (= c 5)))` That's not true in Python though. a = b = c = <expre
347.
▲
by
pansa2
2y ago
Also, you can now use the same quote character that encloses an f-string within the {} expressions. That could make them harder to tokenize, because it makes it harder to recognise the end of the string.
348.
▲
by
pansa2
2y ago
> TypeScript, Swift, Kotlin, and Scala take string interpolation to the furthest extreme of encouraging actual code being embedded inside strings. So to highlight a string, one must count curly brackets and maintain a stack of parser st
349.
▲
by
pansa2
2y ago
It’s a shame they named their next CPU “Pentium Pro” instead of “Hexium” (or “Sexium”!)
350.
▲
by
pansa2
2y ago
What makes 3.8 feel more modern than 3.7 for you? Isn’t the main difference the infamous “walrus” operator?
351.
▲
Python 3.13, what didn't make the headlines
(bitecode.dev)
33 points
by
pansa2
2y ago
|
11 comments
352.
▲
by
pansa2
2y ago
That blog post seems a lot more involved - it adds code to the bytecode compiler as well as to the parser. I suspect that’s mostly because the `until` statement is more complex - but another factor seems to be Python’s change in parsing tec
353.
▲
by
pansa2
2y ago
> I was under the impression Python virtually doesn't have lexical scoping at all and that's why `nonlocal` exists Python has had lexical scoping since version 2.2. PEP 227 [0] "describes the addition of statically neste
354.
▲
by
pansa2
2y ago
Ultimately, Elixir is a functional programming language. Has any functional language ever really become popular?
355.
▲
by
pansa2
2y ago
Given what happened with Python 2 => 3, I’m not sure we’ll ever see Python 4.
356.
▲
by
pansa2
2y ago
> like most Python programmers it's not my "day job" to write Python code I’d love to know whether that’s true, and to what extreme. I believe you’re right - that people using Python for a few hours a week (or less) grea
357.
▲
by
pansa2
2y ago
Everything requires an LLM nowadays.
358.
▲
by
pansa2
2y ago
In terms of “break everyone’s code for no good reason”, this proposal is comparable to the removal of the `print` statement.
359.
▲
by
pansa2
2y ago
> I'm not sure if this is needed for variables that are only read It’s not needed. In fact, you should leave it out for read-only variables. That’s standard practice - if you use `nonlocal` people reading the code will expect to
360.
▲
by
pansa2
2y ago
To me, the proliferation of "better classes" implies there's a problem with Python's built-in classes - but what's wrong? Are they just too flexible and/or too verbose? Or actually deficient in some way?
More ›