oshun
oshun copied to clipboard
Why using attributes?
Why my $dog :isa(Dog)
and sub foo($dog :of(Dog)) { ... }
and not my Dog $dog =...
and my sub foo (Dog $dog)
?
Perl has allowed my Dog $dog = ...
forever (although it does nothing) and neither approach is supported in signatures right now so whatever we do there we have to do from scratch anyway.
I'm just wondering the thinking process that got us to the current spec.
There is some discussion about that here https://github.com/orgs/Perl-Oshun/discussions/22, but not really so much clear justification for one way or the other IMO.
Basically what I'd like is for there to be enough metadata that we can fix the Perl Language Server and in my IDE of choice you hover over a method call in Perl and see and signature and return info. Ideally you'd be able to hover over a variable and get its type info, although I realize in a dynamic language that might be very hard. Basically I see types as more useful for debugging large applications. I find with Perl you get to a level of complexity were you end up doing too much debugging code to try and trace back what is what.
uf, language server, that's huge topic on its own :-( but it's also worth of dedicated issue "Oshun should be supported by PLS" (in this repo)
uf, language server, that's huge topic on its own :-( but it's also worth of dedicated issue "Oshun should be supported by PLS" (in this repo)
I know everyone has a different take on this but we really need to think about language server support. The fact ours sucks so much is a major contributor to losing younger devs who grow up using these tools. Having them not work as expected hurts us.
don't get me wrong, I fully support any language server related effort (and imho language server support should be built-in into core so it will be able to better handle pluggable grammars).
See also https://github.com/bscan/, including Data-Class.