Summary: Function type syntax

Stephen Colebourne scolebourne at joda.org
Sun Mar 14 10:56:20 PDT 2010


(Extracting Stefan's list and enhancing)

1) Straw-man, latest
  # ResultType ( TypeList ) ( throws ExceptionList )
  #int()
  #String(File)(throws IOException)
  ##R()(throws E) (#R(A)(throws E), A) curry = ...

2) Peter Levart, 26 Jan 2010
  # ( TypeList : ResultType throws ExceptionList )
  #(:int)
  #(File:String throws IOException)
  #( #(A: R throws E), A: #(: R throws E) ) curry = ...

3) John Rose, 26 Jan 2010 ff
  ( TypeList ) throws PipedExceptionList -> ResultType
  () -> int
  (File throws IOException) -> String
  ((A) throws E -> R, A) -> () throws E -> R curry = ...

4) Neal Gafter, 27 Jan 2010
  # ( TypeList -> ResultType throws ExceptionList )
  #(->int)
  #(File -> String throws IOException)
  #(#(A -> R throws E), A) -> #( -> R throws E)) curry = ...

5) Stefan Schulz, 31 Jan 2010
  [ ResultType ( TypeList ) throws ExceptionList ]
  [int()]
  [String(File) throws IOException]
  [[R() throws E]([R(A) throws E], A) curry = ...

6) Remi Forax, 09 Feb 2010
  TypeList throws ExceptionList -> ResultType
  (plus additional parens rules)
  (->int)
  (File throws IOException -> String)
  (A throws E -> R), A -> (throws E -> R) curry = ...

7) Peter Levart, 9 Feb 2010
  ReturnType  # ( TypeList ) throws ExceptionList
  int#()
  String#(File) IOException
  R #() throws E #(R #(A) throws E, A) curry = ...

8) Stefan Schulz, 16 Feb 2010
  (: TypeList -> ResultType throws ExceptionList )
  (: -> int)
  (: File -> String throws IOException)
  (: (: A -> R throws E ), A -> (: -> R throws E) ) curry = ...

9) Neal Gafter, 26 Feb 2010
  ( TypeList throws ExceptionList ) -> ResultType
  () -> int
  (File throws IOException) -> String
  ( (A throws E) -> R, A ) -> (throws E) -> R curry = ...

10) BGGA
  { TypeList => ResultType throws ExceptionList }
  { => int}
  ( File => String throws IOException}
  { {A => R throws E}, A => { => R throws E} } curry = ...

11) FCM
  # ( ResultType ( TypeList ) throws ExceptionList )
  #int()
  #String(File) throws IOException
  #( #(R() throws E) ( #(R(A) throws E), A ) ) curry = ...

12) FCM Alternate
  # ( TypeList return ResultType throws ExceptionList )
  #(return int)
  #(File return int throws IOException)
  #( #(A return R throws E), A return #(return R throws E)) curry = ...

13) Howard Lovatt, 11 Mar 2010
  # < ResultType ( TypeList ) throws ExceptionList >
  #<int()>
  #<String(File) throws IOException>
  #< #< R() throws E >( #< R( A ) throws E >, A ) > curry = ...

14) Gernot Neppert, 11 Mar 2010
  lambda < ReturnType , TypeList , throws ExceptionList >
  lambda<int>
  lambda<String, File, throws IOException>
  lambda<lambda<R, throws E>, lambda<R, A, throws E>, A> curry = ...

15) Lightweight interfaces, 19 Feb 2010
  interface Name ReturnType ( TypeList ) throws ExceptionList;
  interface Counter int();
  interface Reader String(File) throws IOException;
  interface CurryBase<R, E, throws E> R(A) throws E
  interface CurryResult<R, throws E> R() throws E
  interface Curry<R, A, throws E> CurryResult<R. E>( CurryBase<R, A, E>, A )

Hope this helps,
Stephen


More information about the lambda-dev mailing list