• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need for Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Need for Swift
      • From: Charles Srstka via Cocoa-dev <email@hidden>
References: 
 >Need for Swift (From: Kirk Kerekes via Cocoa-dev <email@hidden>)
 >Re: Need for Swift (From: Richard Charles via Cocoa-dev <email@hidden>)
 >Re: Need for Swift (From: Laurent Daudelin via Cocoa-dev <email@hidden>)
 >Re: Need for Swift (From: Pier Bover via Cocoa-dev <email@hidden>)
 >Re: Need for Swift (From: Charles Srstka via Cocoa-dev <email@hidden>)
 >Re: Need for Swift (From: Carl Hoefs via Cocoa-dev <email@hidden>)
 >Re: Need for Swift (From: Jens Alfke via Cocoa-dev <email@hidden>)
 >Re: Need for Swift (From: Charles Srstka via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: Need for Swift
  • Next by Date: Re: Need for Swift
  • Previous by thread: Re: Need for Swift
  • Next by thread: Re: Need for Swift
  • Index(es):
    • Date
    • Thread