Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When you see code like:

  function read_objfile(obj, objpath,    bytes, end_of_header, header,
                                         end_of_type, type, size,
                                         bytes_after_header)

the parameters separated by the big white space are local variables. It's possible to pass them values, but you're not supposed to.

I wrote a patch for GNU Awk to give it a let statement for binding true lexical variables, so that this could be:

  function read_objfile(obj, objpath)
  {
     @let (bytes, end_of_header, header,
           end_of_type, type, size,
           bytes_after_header)
     {
     }
  }
Unfortunately, this was rejected by the project; I was encouraged to make a renamed fork of GNU Awk, so that's what I did.

https://www.kylheku.com/cgit/egawk/about/



I feel they have a point, gawk has already too many differences compared to awk. If you introduce even more distinct syntax, it is better just to fork it and call it something else.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: