Re: Tuples?
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: Tuples?
- From: Ryan Gonzalez <rymg19@xxxxxxxxx>
- Date: Wed, 20 May 2015 14:07:18 -0500
- To: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Cc: "myrddin-dev@xxxxxxxxxxxxxx" <myrddin-dev@xxxxxxxxxxxxxx>
On May 20, 2015 1:32:29 PM CDT, Ori Bernstein <ori@xxxxxxxxxxxxxx> wrote:
>On Wed, 20 May 2015 12:28:53 -0500
>Ryan Gonzalez <rymg19@xxxxxxxxx> wrote:
>
>> I just noticed the language manual mentions tuple literals; however,
>their type is never specified. Are they even fully implemented:
>
>Yep, and in use all over the place. For example, iterating over the
>utf8
>codepoints in a string:
>
> while str.len != 0
> (chr, str) = std.striter(str)
> use(chr)
> ;;
>
>or command line opt parsing:
>
> for arg in parsed.args
> match arg
> | ('O', arg): use(arg)
> | _: etc
> ;;
> ;;
>
>
>Types are specified as '(t0, t1, ..., tN)', for example:
>
> var x : (int, char, byte[:])
>
> x = (0xf00, 'c', "str")
>
I didn't realize that. Thanks!
>>
>> Also:
>> - The home page still says user-defined traits aren't implemented
>> - In example 5.2 of the manual, a function named "intmax" is defined.
>Later on, it is referred to as "max".
>> - In 6.2, the last "const" is misspelled.
>
>I should get that part of the website into (public) git so that I can
>accept pull
>requests...
>
>I've been pretty bad about keeping docs up to date: Writing code is so
>much
>more fun than writing docs.
I know. I've written projects and forgotten about updating the documentation for months...
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
| Tuples? | Ryan Gonzalez <rymg19@xxxxxxxxx> |
| Re: Tuples? | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: Re: Tuples?
- Previous by thread: Re: Tuples?
- Index(es):