-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove outdated beta comments from main template #2305
Comments
@vasily-kirichenko I agree - when I first started with F#, the first thing I did was delete the comments because they bothered me. I'm curious what others think. |
Kill it with fire.
Am 20.01.2017 8:47 vorm. schrieb "Phillip Carter" <notifications@github.com
…:
@vasily-kirichenko <https://github.com/vasily-kirichenko> I agree - when
I first started with F#, the first thing I did was delete the comments
because they bothered me. I'm curious what others think.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2305 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNPQt7RF5H4QRIyp5p7SOf1sMNP4Nks5rUGalgaJpZM4LpBXp>
.
|
If we assume this is the first code seen by people who don't know anything about F#, I'd say it should be a simple program: // Learn more about F# at https://docs.microsoft.com/en-us/dotnet/articles/fsharp/
// You can also try the tutorial project
open System
let greet name =
printfn "Hello %s!" name
[<EntryPoint>]
let main argv =
printfn "What is your name?"
let name = Console.ReadLine()
greet name
0 // last expression in a function is always the return value The idea is that we don't introduce special fancy functional stuff, we just make F# look like a python, it should feel familiar and intriguing but not too intriguing. |
@smoothdeveloper I think that's a good idea from a learning perspective, although I'm not sure how that will be viewed for existing developers. Unfortunately, we don't have any data in VS about things like if people comment out or delete default stuff from templates, so there isn't a good way to approach this from a data-driven perspective. |
@cartermp should we then keep printfn "%A" argv That is also something which seems odd in a default template, since we don't have data, we should try to make decision based on input from @dsyme We had a bit of talk about defaults for existing developers (in my issue #2336) and it seems we don't necessarily optimize for seasoned F# developers (the nuget discussed there is not going to be used in large majority of the cases, there is no C# code around which exposes value tuples, nor much F# code using struct tuple notation, along same way it is unlikely C# newbies trying F# will understand why F# pulls that by default while C# doesn't, value tuple being a minor/special case feature, especially in F#). Speaking of appealing to new users, I think having the same layout of project templates than C#/VB would be good:
Having all project template structure look the same among the three languages would be a 👍 to disarm the feeling that F# is something else than a normal / mainstream .NET language. |
We could aim for a bit of parity, but unfortunately we lack the IDE tooling for Classic Desktop-style templates, and cannot support the same number of PCL profiles as C# and VB. We're always going to look different there. |
^^^^ This one thing alone is probably impacting adoption of F# more than anything else. When someone unfamiliar with FSharp gets their interest piqued and wants to take a look at it, the first thing a lot of them (Windows devs anyway) will do is File->New Project... Visual F#... and then they see the screenshot posted above. "So this language is only good for library code and CLI apps" they say to themselves. "Bummer, oh well, back to C#/VB for me". Thus ends their brief foray into the wonderful world of F# and functional languages. Ouch! You want to know the first thing I did with the latest VS2017RC? File->New Project... F#.... WT?? "Where are the templates for web-sites, web-services, etc...? Why don't I see the same templates I see for C#?! Why, even when I click on 'Online->Visual F#' does it say 'No items available for Visual F# ?!" All this does is reinforce the notion that F# is just some niche academic thing that functional nerds play with to annoy their co-workers. As what I would self-describe as somewhat advanced-newbie, I'm a big fan of F#, and even though I sing it's praises at work as much as I can, I'll never get buy-in with the other developers so long as this situation exists (lack of IDE tooling as good as that for C# is also an issue). When you can supply them with good clean examples of what F# can do, it helps a lot. While the senior devs in my group grouse about me using F#, the junior devs are much more open to it. One of our junior devs asked me for help writing a web-service that could be called by a custom script he was working on to insert a row into a database, I showed him how quick and easy it was to do with a simple F# WebApi controller using a SQL Type Provider, and he thought it was pretty cool. Those kinds of templates should be available OOTB; not solely by spending time GooBinging through F# blogs to figure out how. Things like MVC, WebAPI, Suave, etc.. should all be OOTB. As for desktop-app templates, that would be tremendously cool also; couldn't the existing tooling be reworked to work with F#? On the topic of comments: I wonder if the template GUI could have a "checkbox" to enable "beginner help" comments. This could allow the developer to decide whether they want them or not. As far as whether to make "simple, python-like" templates or more "idiomatic" templates, I can see value in both. Simple ones would make it more readable to an F# newbie, but idiomatic would be more useful for someone truly trying to learn and adopt the language in all its fullness. |
@jhurdlow Useful comments. I agree very much. The lack of a really compelling templates in-the-box (or even online) is really a big problem for adoption. The console app as the primary template sends a really bad signal, as does the lack of up-to-date ASP.NET templates. There were many online templates for VS2012-13 but I believe many of these have not been migrated over time, as the community have moved more to other templating solutions (Forge, or Suave's own getting-started material, or ProjectScaffold). This particularly happens now that VS forms a slightly lower percentage of all F# developers - ideally people want templating solutions that are independent of editor tooling, and many experienced F# devs want ones that are more command-line driven. But none of that helps to convince C# devs (i.e. looking for click-me eye-candy to delight them :) ) |
Adding this comment: https://news.ycombinator.com/item?id=13546749
There are many relevant comments about F# on https://news.ycombinator.com/item?id=13544491 |
Lots of good feedback there. Also after some discussion with folks in the F# slack (@isaacabraham, @ReedCopsey) it sounds like there's a good opportunity to get WPF templates for F# with the XAML Type Provider in as well. I'm very much in support of that. |
@cartermp I recommend a quick win which is just create an single file in VS2017 templates which has a link to my Learn F# book which has examples for WPF and ASP .NET Web API ;-) |
@isaacabraham Do we know what's stopping the community from checking in new templates into Visual F#? They just need to go here - the format is pretty simple. We have to be careful about quality - all templates would need to be regularly re-tested as each new edition of the Visual F# Tools is prepared - but the lack of templates is definitely retarding the growth of the language among Visual Studio users. Perhaps we could start a movement (like the error messages one), with a governing issue to state and track the overall plan? I'd be willing to contribute to the plan if someone looked after the admin? |
Sounds like a plan. Let me have a chat on slack to see who might be interested - if there's enough interest I'll create an overall issue to track it. |
C#/VB project templates do not contain such comments. Why we need them?
The text was updated successfully, but these errors were encountered: