Idea: evolve special compilation mode used by main.swift/playgrounds into a special notation for defining a function?

I think the existing facilities for handling the different syntax for top-level 'main.swift' and playground files are pretty disappointing in current form -- particularly the way that the design prevents sharing code between playgrounds and swift application's ...

I suspect presentation issues with my comment as primary reason why no one is interested to discuss this topic. I was not actually intending to propose something specific with the .swiftscript file extension example ... Lots of different ways to address the existing limitation ...

I suppose this thread doesn't (and won't) discuss anything actionable and only exists to document my hope that someday swift will be interested in making a generalized fast-feedback-prototyping-workflow into a language feature suitable for developer use and not just a custom application to support teaching the language ...

1 Like