Hacker Newsnew | past | comments | ask | show | jobs | submit | jcaguilar's commentslogin

I only wish that the syntax was changed to make it easier to search/grep for the definition of functions and types. Odin makes this so nice, you can search for “<function|type name> ::”. Maybe moving the return type to after the closing parenthesis would be enough?

2 more wishes: add named parameters and structured concurrency and I think it would be a very cool language.


It was the minimal change from C. It's fairly easy regex out the types, so while not as nice as Odin, it should be straightforward.

Named parameters are already in the language.

Regarding concurrency, I don't want to pick a single concurrency model over another. I will see what hooks I can make for userland additions, but the language will not be opinionated about concurrency.


This reminded me of The Cherno’s Walnut library:

https://youtu.be/-NJDxf4XwlQ


First of all, this is an immediate rendering library which is a very inefficient way of rendering the UI for any application that is not a videogame. You are rendering the UI 60 times a second, regardless of whether something changed or not. Most UI frameworks only update when something changes.

Secondly, there are things in GUI frameworks that most people don't think about, such as accessibility. Windows has a builtin accessibility API where apps can declare the objects being shown on the screen, so that screen readers can interact with the application. I'm pretty sure this guys framework doesn't have that.


Do you mind explaining why defer is a problem in Go? I only have experience with Java’s try-with-resources which I like a lot, it looks like C# using is similar.


I’m not the commenter but I too am not a fan.

1. You cannot remotely easily wire them in a SIGINT scenario. I have done it, it was a load of plumbing and I wrote an equivalent to Java’s shutdown hook and tied it to sigterm and sigint then called that same hook in the normal shutdown path to simulate the defer call cycle.

2. “using” or “with” in other languages is nice and explicit about when it runs and you can easily run it before your function exits. In the case of go you need to wrap some function to force this same behavior in Go and it looks very forced.

Defer is fine, especially if you’re writing something with a simple life cycle. I just end up using it less when I need to support cleanup functions being called no matter what in a graceful shutdown.


ad.2 defer in go is function-scoped, but in zig block-scoped, so you can create block in zig to defer earlier?


Interesting, I can see those 2 issues.


go's defer is braindead because of its scoping.

Zig's defer is block scoped, so you can actually use it much more easily.


I see often people mentioning that Metal’s API is the easiest to use between DX12, Vulkan and Metal. I saw that the game engine mach (Zig) is creating sysgpu which is based in WebGPU. Maybe a silly question and probably too much work, but I wonder, Would it be possible to recreate Metal’s API on top of Vulkan and DX12?


This was in HN yesterday. It has tips in how to start:

https://www.npr.org/2019/12/30/792439555/making-art-is-good-...


Essential Calculus

Skills Practice Workbook with Full Solutions

By Chris McMullen

Review: https://www.youtube.com/watch?v=Eqfa6MhAqcw


His episode 89 - Just Draw - was so useful to me: https://youtu.be/WLqWX7onVmU


a JVM language (Java, Kotlin) is your best bet, I have used the JVM for years. I had problems using JS or Python. .net should work well too but I have not experience with it.


Yeah, I side on the jvm instead of c# for the ecosystem, thx.


C# is not hard to do after knowing Java, here is an option in DotNet: https://github.com/mono/SkiaSharp



Yes, that was exactly the one I was referring to in my OP, but I couldn't remember enough keywords to find it. Thanks!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: