emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OFFTOPIC] Re: Handling extensions of programming languages (Perl)


From: Harald Jörg
Subject: Re: [OFFTOPIC] Re: Handling extensions of programming languages (Perl)
Date: Mon, 22 Mar 2021 23:05:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>>> That was my first thought as well.  But then, the declarators appear in
>>>> places where other languages have their types.
>>>
>>> [ I think you use a very restricted definition of "other languages" here.
>>>   It's definitely not the case for most of the statically typed languages
>>>   I've used, except for C.
>>>   I'm thinking of OCaml, SML, Haskell, Agda, Coq, Modula-2, Pascal, Ada, 
>>> ... ]
>>
>> Guilty, your honor.  In the last years I've dealt with Emacs Lisp (only
>> very recently), Perl, C, Java, JavaScript ... and before that with a
>> dialect of PL/1, assembly languages (68000, x86, /390) ... and before
>> that with FORTRAN, where everyone's type system seemed to be IMPLICIT
>> INTEGER I-N.  So indeed, almost no intersection with your list.
>
> Of those the only ones that are statically typed seem to be C, Java,
> Fortran and PL/1; and AFAICT only 50% (C and Java) use a syntax where
> the type is placed at a location comparable to where `my` is placed in
> Perl, IMO.

Fortran, too, unless you do the IMPLICIT trick.

But anyway: Looking at the Emacs modes for Java and C, all keywords like
"private" and "static" (which, similar to "my" in Perl, define scope
rather than type) are in keyword-face.  This would indicate that
keyword-face is to be preferred for the declarators, and type-face for
the types.
-- 
Cheers,
haj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]