siyu-npc / learning-q-sharp Goto Github PK
View Code? Open in Web Editor NEW微软Q#
微软Q#
如第一章的
$\begin{bmatrix} 1 \ 0 \end{bmatrix},\begin{bmatrix} 0 \ 1 \end{bmatrix},\begin{bmatrix} \frac{1}{\sqrt{2}} \ \frac{1}{\sqrt{2}} \end{bmatrix},\begin{bmatrix} \frac{1}{\sqrt{2}} \ \frac{-1}{\sqrt{2}} \end{bmatrix}\begin{bmatrix} \frac{1}{\sqrt{2}} \ \frac{i}{\sqrt{2}} \end{bmatrix}$
图1.1 态矢量
4.2.1 (2) 中有这样一段话
“Q#不是一种强类型的编程语言,在定义一个新的变量时,变量的类型由编译器根据其具体值进行推断。”
首先,作者你是不是弄混了强弱类型和静态动态类型的概念😅……
其次,Q#是强类型,静态类型语言。Q#不支持隐式类型转换,而且虽然Q#支持类型推断但是不能在运行时改变变量类型。类型是编译期确定的。 https://en.wikipedia.org/wiki/Strong_and_weak_typing
以及,稍微吐槽下,using和Range不是Q#特有的,C#和F#里有using statement:
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement
https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/resource-management-the-use-keyword
F#有个类似的东西叫Sequence
https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/sequences
其实Q#挺像F#的。M$以前弄得LIQUi|〉就是F#写的。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.