MedVision ad

Functional Paradigm (1 Viewer)

Ragerunner

Your friendly HSC guide
Joined
Apr 12, 2003
Messages
5,472
Location
UNSW
Gender
Male
HSC
2003
What type of questions can they possibly ask us for the function paradigm?

The only functional paradigm question i've come across in all the past papers is just observing fragments of code and editting them accordingly to the question.

Anything else I should look out for in particular?
 

Jinglebell

Member
Joined
Mar 2, 2003
Messages
381
Location
over here!!!
Gender
Female
HSC
2003
in our trial (i think it was cssa, but i'm not sure) we got

-a code fragment to identify as functional and state why

-"imperative languages use control structures of sequence, selection and repetition and global variables. explain how functional and logic languages acgieve the same outcomes without all of the control structures and global variables" 4 marks

-discussing a statement about logic languages operating on a higher level than other paradigms, with reference to the other 3 paradigms

-one of those 'pick the appropriate paradigm for this scenario' things, where you had to say why the other paradigms were less appropriate

so it was mostly writing about the features of the functional paradigm in a bunch of diffeent contexts.
 

grendel

day dreamer
Joined
Sep 10, 2002
Messages
103
Gender
Male
HSC
N/A
Possible questions.....

-Compare and contrast between the different paradigms.

Functional languages are not procedural, basically a series of (nested) function calls.

-How do functional languages handle iterations(loops)? Recursion.

-You are not expected to know any functional languages but you may be asked to write some code given a sample code segment example. SamD's text covers Haskall which is pretty easy to understand.

Other than that I am not sure.
 

Freedom_Dragon

The 36th Dragon
Joined
Oct 11, 2003
Messages
154
Location
Behind a door that will never open.
Gender
Undisclosed
HSC
N/A
just to add to that Functional is not the only one to use
recursion, logic programming
also uses recursion.

Recursion(a function directly/indirectly calls upon itself) are more efficient than loops, recursion uses less line of codes.
 

Glide

Member
Joined
Oct 13, 2003
Messages
103
Logic is based on facts and rules... wheres the recursion in that D:
 

Ragerunner

Your friendly HSC guide
Joined
Apr 12, 2003
Messages
5,472
Location
UNSW
Gender
Male
HSC
2003
When you got a rule within a rule.

If I recall correctly, SamD has a good explanation on it and how it applies to the logic paradigm. But like woah, i had to read it like 3 times to understand it fully.
 

SamD

Member
Joined
Jul 21, 2002
Messages
256
Gender
Male
HSC
N/A
You can use recursion in any of the paradigms, its just that in purely functional languages recursion is the primary method for implementing repetition (and in some functional languages its the only method).

HTH
Sam
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top