Closed emil14 closed 1 month ago
Just like in Go we can define several type and const in one block. But, unlike Go we can also define several component (Go doesn't allow func blocks).
type
const
component
func
When I look at stuff like this
component { Foo(a) (b) { // ... } Bar(a) (b) { // ... } Baz(a) (b) { // ... } }
It looks like this is a single component with several methods. In fact these are 3 different components but the keyword is component, not components.
Do we need these grouped forms declarations? If we should get rid of them, we should do it now. It will be harder to do later
Without:
component Foo(a) (b) { // ... } component Bar(a) (b) { // ... } component Baz(a) (b) { // ... }
What you gain in factorizing component you lose in tab-levels. I will not find it that useful to use blocks except for const {}, maybe. I prefer renaming to comp to make it shorter.
const {}
comp
Done
Just like in Go we can define several
type
andconst
in one block. But, unlike Go we can also define severalcomponent
(Go doesn't allowfunc
blocks).When I look at stuff like this
It looks like this is a single component with several methods. In fact these are 3 different components but the keyword is
component
, not components.Do we need these grouped forms declarations? If we should get rid of them, we should do it now. It will be harder to do later
Without: