Re: Need for Swift
Re: Need for Swift
- Subject: Re: Need for Swift
- From: Jens Alfke via Cocoa-dev <email@hidden>
- Date: Mon, 14 Oct 2019 17:21:06 -0700
> On Oct 14, 2019, at 5:02 PM, Charles Srstka <email@hidden> wrote:
>
> Swift, on the other hand, can actually *be* a scripting language if you want
> it to; put #!/usr/bin/env swift at the top of a source file, give it execute
> permissions, and voilà, it’ll run just like a script.
*Anything* can be a scripting language in that sense, in Unix. I could write a
two-line script called "run_c" containing*:
#! /bin/bash
cc "$1" -o /tmp/a.out && /tmp/a.out
and put it somewhere in my path; then I can put "#! /usr/bin/env/run_c" at the
top of any C source file and run it as a script.
To me, "scripting language" strongly implies a CLI, plus dynamic typing, and no
boilerplate (so I can write one-line programs.)
—Jens
* Typed in Mail. Should work, but I haven't tested it.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden