Is Visual F# backwards compatible? - f#

I am trying to find out if it is possible to replace parts of an older applications built in T-SQL with Visual F#?
Is Visual F# a stable language regarding updates? Ex, the meaning of reserved words change over time? Are some parts of the langue guaranteed to be backwards compatible? Will they remove some standardized functions in the future etc..?
Thank You!

F# is pretty stable language (we use it in production since 2009 when it has version 2.0). Currently it has version 4.0 (previous versions specified here http://fsharp.org/specs/language-spec/). I'm pretty sure that the meaning of reserved words etc. will not be changed.
P.S. In this answer I mean by F# the version of language known as Visual F# and distributed by Microsoft. Generally speaking F# is open sourced and there may be different flavors of language. See more here: http://blogs.msdn.com/b/dsyme/archive/2015/10/23/a-letter-about-quot-f-quot-and-quot-visual-f-quot.aspx

Related

Delphi: Free TSynEdit replacement

What's the best free replacement for TSynEdit? As I can see, it is developed very slow. Want to find some replacement for it. Or, may be, the version from another maintainer.
Need Delphi 2010 compatibility.
SynEdit works fine under D2010. There's one notable bug involving the Enter key not working under certain conditions. A patch for it can be found about halfway down the page on this thread. Search for // GB: BUG FIXED
Aside from that, it should work. Are you having some specific issues with it?
You can try out Scintilla. As of version 2.x it supports "virtual space" (most important feature for me - after syntax highlighting) and has more features like CodeFolding, Annotations http://www.scintilla.org/ScintillaDoc.html#Annotations, MultipleSelections, and many more.
AFAIK there is no wrapper for Delphi that is up-to-date and works with Unicode/D2009+.
I've created a project at http://code.google.com/p/dscintilla/ which should be in 'beta stage' in a week (or so).
I have never used SynEdit myself, but have always believed it to be the best free open-source advanced editor component for Delphi. Because it is open-source, you can yourself alter it to suit your needs.

Is there a site which offers an interactive F# shell?

Is there a site like try ruby that allows one to experiment in an F# interactive shell? I'd like to try a few commands without installing Visual Studio or Mono.
There is also now tryfs.net.
Not yet that I know of. (This is something the F# team would love to do if/when we can find the free time to put it together.)
(Note that you don't need VS or Mono - you can just have .Net and then install the F# CTP and just get the runtime, command-line compiler, and fsi.exe, and use that. But it would be nicer if there were a no-install web-site-visit try-it thingy.)
You can use codepad.org for experiments with OCaml. The core of F# and OCaml is similar, just remember not to use light version of syntax, advanced F# features and .net libraries :)
ideone.com now supports F# ! Here are some samples.
It's not really a REPL, but rather an online compiler.

What are the recent changes to F#?

I am starting to learn F#. I am well versed programming languages like C# (and using the .NET framework in general), but functional programming is new to me. The way I learn best is by taking a book about the subject and starting to read - so I grabbed a copy of "Expert F#" and "F# for scientists". A few times I got the impression that those books seems already to be outdated due to recent changes in the language - nothing too dramatic, but it gives a bit of a nagging feeling that there may be more.
Now that F# 2.0 seems to have stabilized, it would be nice to see how the 'real' F# has turned out compared to the versions of the language described in those (and similar) books.
So my questions are:
what topics have changed since the books were printed, and are no longer valid as described? Are ther any chapters I can skip completely? (I am aware that some functionality has been moved to the the PowerPack, though it is not totally clear to me which functionality is in the PowerPack, and which is in the standard install)
what features of the language are described correctly, but have newer alternatives available? (Is the description of events still up to date?)
which features of the language I should be aware of that were added (or modified) since those books were written?
are there other recent changes in the language that I should be aware of?
edit:
Thanks all for the answers!
As far as release notes go, I was able to dig up the following "detailed release notes" posts on Don Syme's blog, applying to versions of F# after 1.9.2 (the version "Expert F#" mentions as being the version used in the book):
Versions 1.9.3.7 and 1.9.3.14
Version 1.9.4 and 1.9.4.19
Version 1.9.6 (September 2008 CTP)
May 2009 CTP ("Beta 1")
October 2009 ("Beta 2")
2.0 RC (February 2010)
I didn't find anything about version 1.9.5 - did that one ever exist?
I probably can't give a complete answer, but here are some things that come to mind as having undergone non-trivial changes in the past two years I've been working on F#...
Minor changes:
Many library functions have been
renamed. There originally was a penchant for underscores that has
since been removed to be more
.Net-like. So e.g. Seq.to_array is
now Seq.toArray. Some significant changes to async and quotations APIs too.
#light is now the default, you can quit putting it at the top of every file
some changes to the APIs/declarations of events and enums (the language reference and library docs on MSDN are good for up-to-date information)
no more need for [<OverloadID>] to make overloaded member functions
New features:
Units of measure was new in Beta1.
comparison and equality constraints were new in Beta2.
unmanaged constraint in RC.
(check out the "release notes" for various releases, linked in prior bullets, for more)
I'm doing a windiff of the lastest(1.9.9.9) and previous(1.9.7.8) release of FSharp.
I noticed many added calls to checkNonNull in Array, Seq, Reflect and the Quotation module. I assume these calls were added to protect F# libs from being passed nulls from another language such as C#. Any insight Brian? The function nullArg throws an ArgumentNullException.
let inline checkNonNull argName arg =
match box arg with
| null -> nullArg argName
| _ -> ()
There is a new override ToString in set and improved formatting for set and map printing with sformat aka printf "%A".
Some internal cleanup of BigInteger for use with .net 4.0.
I see a lot of internal changes to async as Brian mentioned.
Some internal changes to Event to use IObserver.
I finished going through all the changed fs files and most of the changes are to private functions that are not exposed directly. The only thing that may effect the user is different pretty printing of sets and maps.
Check out the Release Notes.

What tools are built using themselves? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am curious about what tools are used to build the next version of themselves.
For example, Delphi has long claimed that "Delphi is written in Delphi".
I assume Visual Studio is written using Visual Studio.
What are some other examples of tools that written in themselves?
Interestingly, the VB.NET & C# compilers themselves are written in unmanaged C++ (leading to the C++ team's T-Shirt: "My compiler compiled yours"). The C# team hopes to have a fully managed-C# hosted C# compiler for VS2010.
Bjarne Stroustrup mentioned in The Design and Evolution of C++ that the first C++ compiler was written in C++.
I've just noticed this is also a question in his FAQ:
The first C++ compiler (Cfront) was
written in C++. To build that, I first
used C to write a "C with
Classes"-to-C preprocessor. "C with
Classes" was a C dialect that became
the immediate ancestor to C++. That
preprocessor translated "C with
Classes" constructs (such as classes
and constructors) into C. It was a
traditional preprocessor that didn't
understand all of the language, left
most of the type checking for the C
compiler to do, and translated
individual constructs without complete
knowledge. I then wrote the first
version of Cfront in "C with Classes".
This is off-topic, but strictly speaking, it is an example of a tool which builds itself.
The reprap - an open-source 3d prototyping machine, which recently gave 'birth' to "its first complete working replicated copy".
I love this kind of stuff.
Generically speaking, C compilers are usually written in C... *nix kernels are compiled on *nix, etc.
Also, there's the pypy project which provides a Python interpreter written in Python.
When gcc (the Gnu C compiler http://gcc.gnu.org/) was not available widely, you had to compile it from source, compiling stage1 compiler, then compile stage2 with stage1, till you have your final compiler. I assume it must be the same today.
Here is another example: Mono's C# compiler is self hosting - i.e. it's written in C# and used to compile itself.
Dog fooding refers to the more general practice of a company using its own product internally, especially during its development.
Lots of folks like to look at how Lisp can be implemented in Lisp.
Squeak is a Smalltalk-80 implementation written in itself.
even its virtual machine is written entirely in Smalltalk making it easy to debug, analyze, and change.
Sun's Java compiler has long been written in Java. However, recent work is writing a JIT compiler in Java as well. This is the JVM component that converts Java byte code to native processor instructions.
We use to develop using RealBasic. The IDE is written in itself, or so I've been lead to believe.
ghc, the Haskell compiler, is mostly written in Haskell.
tcc is another self-hosting C compiler for x86 and ARM. Its claim to fame is being, well, tiny (100k or so for preprocessor, compiler, assembler, and linker).
I would assume that pretty much any tool that's part of the typical development process would be involved in its own development, to whatever extent possible. This includes:
certain programming languages, especially compiled ones
IDEs
text editors
version control systems
bug trackers
build systems
If you're on a team building one of these tools, and you're not developing it for a specific niche that doesn't apply to your team, I don't know why you wouldn't use it to build itself. Having developers be users of the product is one of the best ways to find possible improvements.
For the AmigaOS there was a third party Basic interpreter (don't remember the name) for which you could later buy a compiler. The compiler was delivered as source, so you had to use the interpreter to run the compiler to compile itself...
To cite Kent Beck:
...it may seem a bit like performing brain surgery on yourself.
Visual Studio and Team Foundation Server build themselves. It's called dogfooding, a term which if not originating in Microsoft, it certainly likes
Oracle Application Express is a web application development tool that is built in itself.
Eclipse IDE is generally built and developed using Eclipse IDE.
It is fairly typical to have a languages compiler written in its own language. This is called self-hosting or bootstrapping.
Maven2 is built using Maven2.
Ok, it's not built (i.e. written) using itself, as it is a tool to build (i.e. compile) project, but it is using its own code to compile...
I was amazed with JSLint
In short it has been described as Javascript "compiler" using javascript.
I am building an IDE-based code generator, and I am using it to build itself. If fact, as Stroustrup did, I am first building a valid generator model and using a pre-processor to build the final C++ code to compile. Once I have a good working version of the IDE, I'll start using it to build further versions of itself.
It's like giving a new dimension to the meaning of "recursive programming"!
AFAIK does the OpenJDK build itself first with the installed java and afterwards with itself.
Naturally the Jetbrains team uses its own IDE IntelliJ IDEA to develop this IDE.
I assume this is true for most IDE vendors.
As far as I know, when building EMACS from source, all of the ELISP code is bootstrapped. I found that quite noteworthy.
Not quite what you're asking for, but the entire development environment for Revolution http://www.runrev.com is built using Revolution itself, and the source (except for small parts that enforce the license) is completely exposed in source form. So if you don't like the way the dev environment is implemented, you can change it. Find a bug, fix it. You can also easily build additional development tools and integrate them.
Ada and Forth
I gave the Smalltalk-80 answer an uptick. Best, most elegant example I can think of. The question also reminds me of a slightly related problem that used to be popular: write a program that outputs itself. Not the same level of bootstrapping, but a fun little programming puzzle for your amusement. Maybe not possible in all languages?
The old Watcom C/C++ compiler was built using itself.
Kragen Sitaker's Ur-Scheme is a fine example of a small nontrivial compiler written in itself. That page links to several more good sources in that vein.

Are there any support tools like coderush or resharper for F#?

Are there any support tools like coderush or resharper for F#?
Preview version of FSharpRefactor released in Visual Studio Gallery.
http://visualstudiogallery.msdn.microsoft.com/339cbae9-911d-4f99-9033-3c3564676f45
http://www.youtube.com/watch?v=T6-YjUULNCA/
F# Refactor open source project on CodePlex (Apache license).
Take a look at the open-source Visual F# Power Tools project. They've got a rename refactoring, some code generation stuff (eg. record stub generation), graying out of unused declarations, as well as some other things. They're moving pretty fast at the moment, with lots of new features getting added all the time.
There's an effort to support F# in ReSharper via an external plug-in (itself written in F#). You can find preliminary info here.
FSharpRefactor 0.1 (Preview version) Released on the Visual Studio Gallery.
http://visualstudiogallery.msdn.microsoft.com/339cbae9-911d-4f99-9033-3c3564676f45?SRC=Home
Not yet, as far as I know. I was also looking for something similar to no success. I suspect as soon as F# hits VS2010 as its integral part, or even a bit earlier, such tools will eventually emerge.
As far as ReSharper is concerned, you may want to drop JetBrains a quick email, it would be interesting to know whether these guys have any plans regarding F#.
Since the push in f# is towards light mode the reformatting possible is likely to be both limited, and hard to implement.
Normally reformatting takes the structural information and uses that to create the textual position. In the case of #light the textual position (of indenting at least) is the structure. As such any reformatting would be at best to sort inter symbol spacing, hardly onerous to do yourself.
I would therefore not expect a commercial product for it at least until the 'proper' integration with the IDE (I do not consider the current CTP proper in this regard since several outstanding bugs with it exist which will not be fixed in 2008)
CodeRush is working in F# editor. At least some code assistance and code templates. But code templates are not defined yet (you have to create your own).

Resources