[Gambas-user] [Git][gambas/gambas][master] Get rid of unitialized variables warnings in the IDE source code.

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed Feb 14 23:27:33 CET 2018


I don't think so. I think it would be having the best of the two worlds. Of
course such static checking couldn't be done in a lot of cases in language
like Gambas, but in these simple cases, why not?
If the argument is "as object", then it could be checked against
non-objects like integer. If it is "as variant", then it would have to be
ignored for the check, unless you are going to check how the variant is
used in the function/sub.


Jussi

On Thu, Feb 15, 2018 at 12:16 AM, Adrien Prokopowicz <
adrien.prokopowicz at gmail.com> wrote:

> Le 14/02/2018 à 22:37, Jussi Lahtinen a écrit :
>
>> Example if you declare function Test(x as integer) and call it Test("a"),
>> there could be *compile* time error message about wrong type. TypeScript
>> does that, even when it is otherwise dynamic language.
>>
>>
>> Jussi
>>
>> On Wed, Feb 14, 2018 at 11:24 PM, Benoît Minisini <g4mba5 at gmail.com
>> <mailto:g4mba5 at gmail.com>> wrote:
>>
>>     Le 14/02/2018 à 22:17, Jussi Lahtinen a écrit :
>>
>>         Btw, did you see my mail about type checking in dynamic
>>         languages, like in TypeScript? I was just curious whether that
>>         could be possible in some extend in Gambas.
>>
>>
>>         Jussi
>>
>>
>>     I saw the mail, but I have no idea what you were talking about.
>>
>>     --     Benoît Minisini
>>
>
> That would be very nice to have, but I'm not sure if this wouldn't clash
> with the fact that Gambas has Duck Typing ? (altough I haven't seen it used
> anywhere, let alone mentioned in the documentation)
>
> --
> Adrien Prokopowicz
>
>
> --------------------------------------------------
>
> This is the Gambas Mailing List:
> https://lists.gambas-basic.org/listinfo/user
>
> Search the list:
> https://lists.gambas-basic.org/cgi-bin/search.cgi
>
> Hosted by https://www.hostsharing.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180215/fdd17fc2/attachment.html>


More information about the User mailing list