Sayfalar

26 Ağustos 2014 Salı

C++ 14 Announced

https://isocpp.org/blog/2014/08/we-have-cpp14

C++ 14 standard has been announced.C++ 14 have a lot of new capabilities and this capabilities is made C++ more powerful and modern language.Here a blog post for new features about C++14.

Clang 3.4.x and newest version of GCC support C++ 14 standard.

Here some of the features which really affect me  ;

N3532  - Dynamic Arrays 

N3534 - C++ Pipelines

N3554 - A Parallel Algorithms Library for C++

N3559 - Proposal for Generic (Polymorphic) Lambda Expressions


Dynamic Arrays will play huge role for memory management in C++ projects.

C++ Pipelines and Parallel Algorithm library is also very important , because all of the computer architecture in today have multiple core system and we must use all of the power for strong and fast software.

Lambda  came with C++11 but now it have more power in C++.


1 Ağustos 2014 Cuma

Haskell Day6

Basic I/O

Here is the most classic program ever :)

main = do
     print(“Hello Word”)

If we want to get input in Haskell we can use getline function for strings,integers or other basic input data. For example :


main= do
       putStrLn "enter age"
       age <- getLine
       putStrLn("Hello " ++ age ++ " boy")

Let do some fun thing with simple ı/o and some condition situations :)

main= do
          putStrLn "enter age"
          age <- getLine
          if read(age) > 50
                  then do print("You are too old man")
          else
                 do print("Yeah men you have a lot of time for Haskell !")


In line 2 we enter the value of the age.line 3 take the argument and equalize the value of the age variable. In line 4 with read function we can compare a string and a integer because Getline function get string and read function change it.then line in line 4 if do the condition things and “then do” parts is returning part.