LINUX.ORG.RU

История изменений

Исправление monk, (текущая версия) :

То же самое ООП возникает само собой, когда ты пишешь программу с GUI.

Не обязательно. Вот GUI есть, а ООП нет:

module Main(main) where – A simple counter

import Fudgets

main :: Dialogue main = fudlogue (shellF "Counter" counterF)

counterF = intDispF >==< absF countSP >==< incButtonF

incButtonF :: F Click Click incButtonF = buttonF "Increment"

countSP :: SP Click Int countSP = putSP startstate $ mapAccumlSP inc startstate 
  where inc n Click = (n+1,n+1)

startstate = 0 

или вот даже C++

ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save")) MySaveFunction(); 
  ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);

Исходная версия monk, :

То же самое ООП возникает само собой, когда ты пишешь программу с GUI.

Не обязательно. Вот GUI есть, а ООП нет:

module Main(main) where – A simple counter

import Fudgets

main :: Dialogue main = fudlogue (shellF «Counter» counterF)

counterF = intDispF >==< absF countSP >==< incButtonF

incButtonF :: F Click Click incButtonF = buttonF "Increment"

countSP :: SP Click Int countSP = putSP startstate $ mapAccumlSP inc startstate 
  where inc n Click = (n+1,n+1)

startstate = 0 

или вот даже C++

ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save")) MySaveFunction(); 
  ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);