Mailinglist Archive: yast-devel (35 mails)

< Previous Next >
Re: [yast-devel] Hack Week report: learn Crystal by porting part of YaST to that language
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 13 Feb 2020 15:31:33 +0100
  • Message-id: <20200213153133.5743092a@linux-vvcf.privatesite>
V Thu, 13 Feb 2020 11:47:05 +0100
Ancor Gonzalez Sosa <ancor@xxxxxxx> napsáno:

Yes, really. It's surprisingly easy. Although Crystal is statically
type-checked, the compiler does a great job in inferring the types for
everything. That, together with union types and null reference checks,
makes everything really smooth.

I have to say that I really like this part of language (type checking). It is
not annoying bureaucracy like in java, c++ or ycp. It just guess majority of
types and only exception is empty containers or getters/setters where it have
to be written. I also like that nil have to be explicitly enabled for given
variable. So if you specify something like String, you can be sure it is string
and not nil ( yes, I am looking at you ycp ). And same for libraries, you can
safely ignore nil as it say user to not send nil there if you do not enable it

Now for less bright side of type system:

1. it is check only for usage of code. So you can have in library code that is
not checked until it is called. So if you write code that call library, it is
checked. If you write library that is not called, checking is less strong.
2. there is type hole and it is called Pointers and it is explicitly weak in
type system. But I think it is not much used beside bridging to other languages.

So in general if ruby3 type checking will look similar, I think it would be
good change and I enjoy trying new language that is familiar, but also trying
to address some weak points of ruby.

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >