[nem-en] ManagerAccess
Michal Moskal
michal.moskal at gmail.com
Sun Feb 18 16:47:19 CET 2007
On 2/18/07, Vladimir Reshetnikov <v.reshetnikov at gmail.com> wrote:
> On 2/18/07, Michal Moskal <michal.moskal at gmail.com> wrote:
> > Not needed here. Probably some leftover crap. We allow that a an empty subblock.
>
> Thanks.
> Another question.
>
> def name_parms (pos, parms) {
> match (parms) {
> | [] => () // <-- that one
> | (p : Fun_parm) :: ps =>
> p.builder = GetMethodInfo ().DefineParameter (pos,
> parameter_attributes (p), p.name);
>
> match (p.default_value) {
> | Some (TExpr.Literal (lit)) => p.builder.SetConstant
> (lit.AsObject (InternalType));
> | Some (e) => Util.ice ($"complex expr $e");
> | None => {} // <-- this one
> }
> name_parms (pos + 1, ps)
> }
> };
>
> Is there any difference between 'this one' and 'that one', that is
> empty curly braces and parentheses?
Not really... The value returned from an empty block {} is the void
literal, written as ().
--
Michał
More information about the devel-en
mailing list